Browse Source

预警设置菜单基础显示。

还有需要优化的地方
master
xueyu.liu 3 years ago
parent
commit
9d15d18079
  1. BIN
      Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll
  2. 27
      Stone.WinForm/Stone.Entity/Entity_t_ErrTypeLevel.cs
  3. 1
      Stone.WinForm/Stone.Entity/Stone.Entity.csproj
  4. 93
      Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs
  5. 1
      Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj
  6. 10
      Stone.WinForm/Stone.WinForm/frmMain.cs
  7. 36
      Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.Designer.cs
  8. 26
      Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.cs
  9. 27
      Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs
  10. 6
      Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

BIN
Stone.WinForm/Stone.Common.Dlls/Stone.Entity.dll

Binary file not shown.

27
Stone.WinForm/Stone.Entity/Entity_t_ErrTypeLevel.cs

@ -0,0 +1,27 @@
using Gm_WMS.DataAccess.DataService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Stone.Entity
{
public class Entity_t_ErrTypeLevel : EntityBase
{
public static string TableNameNew = "t_ErrTypeLevel";
public Entity_t_ErrTypeLevel()
{
base.TableName = TableNameNew;
base.Init();
}
public Entity_t_ErrTypeLevel(LocalDBService myDB)
{
base.db = myDB;
base.TableName = TableNameNew;
base.Init();
}
}
}

1
Stone.WinForm/Stone.Entity/Stone.Entity.csproj

@ -62,6 +62,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="EntityBase.cs" /> <Compile Include="EntityBase.cs" />
<Compile Include="Entity_t_ErrTypeLevel.cs" />
<Compile Include="Entity_t_PartOutQty.cs" /> <Compile Include="Entity_t_PartOutQty.cs" />
<Compile Include="Entity_t_ShipingVerification.cs" /> <Compile Include="Entity_t_ShipingVerification.cs" />
<Compile Include="Entity_t_BillNo.cs" /> <Compile Include="Entity_t_BillNo.cs" />

93
Stone.WinForm/Stone.WinBiz/BasicData/F_ErrTypeLevel.cs

@ -0,0 +1,93 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using Stone.Entity;
using Gm_WMS.DataAccess.DataService;
using Stone.Common;
namespace Stone.WinBiz.BasicData
{
public class F_ErrTypeLevel : F_Base
{
public F_ErrTypeLevel()
{
this.type = "PartOutQty";
this.name = "基础资料_累计发货数量";
this.entity = new Entity_t_ErrTypeLevel();
//this.entityView = new Entity_v_Product();
}
public override void GetView(DataGridView dgv)
{
base.GetView(dgv);
dgv.Columns["Code"].HeaderText = "类型编码";
dgv.Columns["ErrTypeDesc"].HeaderText = "预警类型";
dgv.Columns["ErrLevel"].HeaderText = "级别";
dgv.Columns["ToPerson"].HeaderText = "邮件通知人";
}
public override void Checking(DataRow drData, bool isNew)
{
//base.Checking(drData, isNew);
//if ((new F_CarModel()).GetData("Code='" + drData["CarModelCode"].ToString() + "'") == null)
// throw new Exception("车型代码 " + drData["CarModelCode"].ToString() + " 不存在!");
//if ((new F_Color()).GetData("Code='" + drData["ColorCode"].ToString() + "'") == null)
// throw new Exception("颜色代码 " + drData["ColorCode"].ToString() + " 不存在!");
//if (MyStrings.GetLength(drData["Name"].ToString()) > 255) throw new Exception("名称不能超过255个字符!");
}
public override void InputData(DataSet dsData, LocalDBService db)
{
//Entity_t_Product t_Input = new Entity_t_Product(db);
//DataRow drInput = null;
//foreach (DataRow drData in dsData.Tables[0].Rows)
//{
// drInput = t_Input.Table.NewRow();
// drInput["Code"] = drData["存货代码"].ToString().Trim();
// drInput["Name"] = drData["存货名称"].ToString().Trim();
// drInput["CarModelCode"] = drData["车型代码"].ToString().Trim();
// drInput["ColorCode"] = drData["颜色代码"].ToString().Trim();
// drInput["Model"] = drData["规格型号"].ToString().Trim();
// drInput["Deploy"] = drData["配置"].ToString().Trim();
// drInput["BarCode"] = drData["条码号"].ToString();
// drInput["PackNumer"] = drData["装箱数量"].ToString();
// drInput["IsStandard"] = drData["是否STD件"].ToString();
// drInput["State"] = drData["启用"].ToString();
// if (drInput["Code"].ToString().Trim() == "")
// throw new Exception("代码不能为空!");
// if (t_Input.GetData("", "Code='" + drInput["Code"].ToString() + "'", "id asc").Tables[0].Rows.Count > 0)
// throw new Exception("代码 " + drInput["Code"].ToString() + " 已经存在!");
// if ((new Entity_t_CarModel(db)).GetData("", "Code='" + drInput["CarModelCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0)
// throw new Exception("车型代码 " + drInput["CarModelCode"].ToString() + " 不存在!");
// if ((new Entity_t_Color(db)).GetData("", "Code='" + drInput["ColorCode"].ToString() + "'", "id asc").Tables[0].Rows.Count == 0)
// throw new Exception("颜色代码 " + drInput["ColorCode"].ToString() + " 不存在!");
// if (MyStrings.GetLength(drInput["Name"].ToString()) > 255) throw new Exception("名称不能超过255个字符!");
// //Checking(drInput, true);
// t_Input.Add(drInput);
//}
}
}
}

1
Stone.WinForm/Stone.WinBiz/Stone.WinBiz.csproj

@ -81,6 +81,7 @@
<ItemGroup> <ItemGroup>
<Compile Include="BasicData\F_Base.cs" /> <Compile Include="BasicData\F_Base.cs" />
<Compile Include="BasicData\F_JIS_Limits_List.cs" /> <Compile Include="BasicData\F_JIS_Limits_List.cs" />
<Compile Include="BasicData\F_ErrTypeLevel.cs" />
<Compile Include="BasicData\F_PartOutQty.cs" /> <Compile Include="BasicData\F_PartOutQty.cs" />
<Compile Include="BasicData\F_Product.cs" /> <Compile Include="BasicData\F_Product.cs" />
<Compile Include="BasicData\F_User.cs" /> <Compile Include="BasicData\F_User.cs" />

10
Stone.WinForm/Stone.WinForm/frmMain.cs

@ -107,6 +107,16 @@ namespace Stone.WinForm
ShowWindow(frm); ShowWindow(frm);
} }
if (e.Node.Text == "预警设置")
{
Stone.WinModule.BasicData.frmErrTypeLevel frm = new Stone.WinModule.BasicData.frmErrTypeLevel();
frm.m_Base = new WinBiz.BasicData.F_ErrTypeLevel();
frm.init();
ShowWindow(frm);
}
#endregion #endregion
#region 基础资料管理 #region 基础资料管理

36
Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.Designer.cs

@ -0,0 +1,36 @@
namespace Stone.WinModule.BasicData
{
partial class frmErrTypeLevel
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
}
#endregion
}
}

26
Stone.WinForm/Stone.WinModule/BasicData/frmErrTypeLevel.cs

@ -0,0 +1,26 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace Stone.WinModule.BasicData
{
public partial class frmErrTypeLevel : Stone.WinModule.BasicData.frmBaseMain
{
public frmErrTypeLevel()
{
InitializeComponent();
}
public override void Search(string code)
{
base.Search(code);
strWhere += " or [Code] like '%" + code + "%'";
}
}
}

27
Stone.WinForm/Stone.WinModule/Standard/frmJISVDA.cs

@ -323,7 +323,10 @@ namespace Stone.WinModule.Standard
string Date = MyDateTime.GetServerDateTime().ToString("yyyy-MM-dd"); string Date = MyDateTime.GetServerDateTime().ToString("yyyy-MM-dd");
string AsnNumbers = ""; string AsnNumbers = "";
List<PartOutQty> lsPartOutQty = new List<PartOutQty>();
var lstSql = new List<string>();
var strsql = "";
foreach (DataRow drData in dtData.Rows) foreach (DataRow drData in dtData.Rows)
{ {
@ -387,9 +390,14 @@ namespace Stone.WinModule.Standard
drVDA["OrderNumber"] = drData["OrderNumber"].ToString(); drVDA["OrderNumber"] = drData["OrderNumber"].ToString();
drVDA["LocationCode"] = drData["LocationCode"].ToString(); drVDA["LocationCode"] = drData["LocationCode"].ToString();
drVDA["releaseId"] = drData["releaseId"].ToString(); drVDA["releaseId"] = drData["releaseId"].ToString();
t_JIS_VDA.Add(drVDA); t_JIS_VDA.Add(drVDA);
//增加已发货数量
strsql = "Update t_PartOutQty" +
" set PartOutQty += " + decimal.Parse(drData["PackNumer"].ToString()) + "" +
" where Code = '" + drData["PartNumber"].ToString() + "'";
db.Exec_NonQuery(strsql);
PackageNos += drVDA["PackageNo"].ToString() + ","; PackageNos += drVDA["PackageNo"].ToString() + ",";
} }
@ -408,12 +416,17 @@ namespace Stone.WinModule.Standard
drVDA["LocationCode"] = drData["LocationCode"].ToString(); drVDA["LocationCode"] = drData["LocationCode"].ToString();
drVDA["releaseId"] = drData["releaseId"].ToString(); drVDA["releaseId"] = drData["releaseId"].ToString();
t_JIS_VDA.Add(drVDA); t_JIS_VDA.Add(drVDA);
//增加已发货数量
strsql = "Update t_PartOutQty" +
" set PartOutQty += " + Odd + "" +
" where Code = '" + drData["PartNumber"].ToString() + "'";
db.Exec_NonQuery(strsql);
PackageNos += drVDA["PackageNo"].ToString() + ","; PackageNos += drVDA["PackageNo"].ToString() + ",";
} }
} }
//MyMessageBox.ShowInfoMessage($"ASN编号:{AsnNumber}\r\n装箱单号:{PackageNos} 生成完成!"); //MyMessageBox.ShowInfoMessage($"ASN编号:{AsnNumber}\r\n装箱单号:{PackageNos} 生成完成!");
MyMessageBox.ShowInfoMessage($"装箱单号:{PackageNos} 生成完成!"); MyMessageBox.ShowInfoMessage($"装箱单号:{PackageNos} 生成完成!");
@ -660,5 +673,11 @@ namespace Stone.WinModule.Standard
// partOutQty.GetData()[] // partOutQty.GetData()[]
// partOutQty.Edit(part, qty); // partOutQty.Edit(part, qty);
//} //}
struct PartOutQty
{
string partcode;
int qty;
}
} }
} }

6
Stone.WinForm/Stone.WinModule/Stone.WinModule.csproj

@ -172,6 +172,12 @@
<Compile Include="BasicData\frmJISLimitsList.Designer.cs"> <Compile Include="BasicData\frmJISLimitsList.Designer.cs">
<DependentUpon>frmJISLimitsList.cs</DependentUpon> <DependentUpon>frmJISLimitsList.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="BasicData\frmErrTypeLevel.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="BasicData\frmErrTypeLevel.Designer.cs">
<DependentUpon>frmErrTypeLevel.cs</DependentUpon>
</Compile>
<Compile Include="BasicData\frmPartOutQty.cs"> <Compile Include="BasicData\frmPartOutQty.cs">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>

Loading…
Cancel
Save