Browse Source

修改。

master
yibo 7 years ago
parent
commit
bc1ce3bc1b
7 changed files with 1471 additions and 17 deletions
  1. +2
    -0
      .gitignore
  2. +13
    -16
      ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs
  3. +1
    -1
      ButcherFactory.Form/Utils/ControlsUtil.cs
  4. +6
    -0
      ButcherFactory.Login/ButcherFactory.Login.csproj
  5. BIN
      ButcherFactory.Login/app.ico
  6. +4
    -0
      ButcherFactorySolution.sln
  7. +1445
    -0
      ButcherFactorySolution/ButcherFactorySolution.vdproj

+ 2
- 0
.gitignore View File

@ -2,5 +2,7 @@
*.user
*.suo
*.tmp
*.exe
*.msi
bin
obj

+ 13
- 16
ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs View File

@ -58,14 +58,14 @@ namespace ButcherFactory.CarcassInStore_
if (workUnitSelect.SelectedValue == null)
workUnitID = null;
else
workUnitID = ((WorkUnit)workUnitSelect.SelectedValue).ID;
workUnitID = (long)workUnitSelect.SelectedValue;
};
productBatchSelect.SelectedIndexChanged += delegate
{
if (productBatchSelect.SelectedValue == null)
batchID = null;
else
batchID = ((ProductBatch)productBatchSelect.SelectedValue).ID;
batchID = (long)productBatchSelect.SelectedValue;
};
}
@ -135,21 +135,18 @@ namespace ButcherFactory.CarcassInStore_
var goods = CarcassInStoreBL.GetGoodsList();
foreach (var item in goods)
{
for (var i = 0; i < 10; i++)
var btn = new UButton() { Width = 90, Height = 50, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(8, 14, 8, 0), PlaySound = true };
btn.Click += (sender, e) =>
{
var btn = new UButton() { Width = 90, Height = 50, Text = item.Goods_Name, Tag = item.Goods_ID, Font = new Font("宋体", 15), Margin = new Padding(8, 14, 8, 0), PlaySound = true };
btn.Click += (sender, e) =>
{
if (string.IsNullOrEmpty(uScanPanel1.TextBox.Text))
throw new Exception("请先扫码");
if (uScanPanel1.TextBox.Text.Length != 23)
throw new Exception("条码格式不正确");
var c = sender as UButton;
var list = CarcassInStoreBL.InsertOrUpdate(workUnitID, batchID, (long)c.Tag, uScanPanel1.TextBox.Text);
AfterUpdateOrInsert(list);
};
flowLayoutPanel1.Controls.Add(btn);
}
if (string.IsNullOrEmpty(uScanPanel1.TextBox.Text))
throw new Exception("请先扫码");
if (uScanPanel1.TextBox.Text.Length != 23)
throw new Exception("条码格式不正确");
var c = sender as UButton;
var list = CarcassInStoreBL.InsertOrUpdate(workUnitID, batchID, (long)c.Tag, uScanPanel1.TextBox.Text);
AfterUpdateOrInsert(list);
};
flowLayoutPanel1.Controls.Add(btn);
}
}


+ 1
- 1
ButcherFactory.Form/Utils/ControlsUtil.cs View File

@ -14,9 +14,9 @@ namespace ButcherFactory.Utils
public static void EBindComboBox<T>(this ComboBox box)
where T : BaseInfo, new()
{
box.DataSource = BaseInfoBL.GetList<T>();
box.DisplayMember = "Name";
box.ValueMember = "ID";
box.DataSource = BaseInfoBL.GetList<T>();
box.Refresh();
}
}


+ 6
- 0
ButcherFactory.Login/ButcherFactory.Login.csproj View File

@ -31,6 +31,9 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>app.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
@ -116,6 +119,9 @@
<ItemGroup>
<None Include="Resources\okBtn.png" />
</ItemGroup>
<ItemGroup>
<Content Include="app.ico" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.


BIN
ButcherFactory.Login/app.ico View File

Before After

+ 4
- 0
ButcherFactorySolution.sln View File

@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherFactory.Form", "Butc
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherFactory.Login", "ButcherFactory.Login\ButcherFactory.Login.csproj", "{EE308848-7317-4CEA-A28C-5A6CCC6AB3A1}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "ButcherFactorySolution", "ButcherFactorySolution\ButcherFactorySolution.vdproj", "{BC9FAD30-8A33-4A41-8C95-4F3C15B1BAEC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -27,6 +29,8 @@ Global
{EE308848-7317-4CEA-A28C-5A6CCC6AB3A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EE308848-7317-4CEA-A28C-5A6CCC6AB3A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EE308848-7317-4CEA-A28C-5A6CCC6AB3A1}.Release|Any CPU.Build.0 = Release|Any CPU
{BC9FAD30-8A33-4A41-8C95-4F3C15B1BAEC}.Debug|Any CPU.ActiveCfg = Debug
{BC9FAD30-8A33-4A41-8C95-4F3C15B1BAEC}.Release|Any CPU.ActiveCfg = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE


+ 1445
- 0
ButcherFactorySolution/ButcherFactorySolution.vdproj
File diff suppressed because it is too large
View File


Loading…
Cancel
Save