using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace SCM { public partial class Gy_BarCodeBillEdit : Form { public Gy_BarCodeBillEdit() { InitializeComponent(); } public Int64 sItemID; public string sBarCode; public string HMaterNumber; public string CampanyName = ""; //客户定制化名称 public SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1(); private void cmdHAuxItemID_Click(object sender, EventArgs e) { SCM.ClsIF_Property_View oProperty = new SCM.ClsIF_Property_View(); oProperty.WherePart = ""; string sWhere = ""; if (CampanyName == "四维尔") { sWhere = " and HMaterNumber = '" + HMaterNumber + "'"; } else { sWhere = ""; } if (oProperty.RefreshView(sWhere)) { txtHAuxItemID.Tag = oProperty.oModel.HItemID.ToString(); txtHAuxItemID.Text = oProperty.oModel.HName; } else { txtHAuxItemID.Text = ""; } } private void txtHAuxItemID_TextChanged(object sender, EventArgs e) { if (txtHAuxItemID.Text.Trim() == "") { txtHAuxItemID.Tag = ""; } } private void button1_Click(object sender, EventArgs e) { try { oWeb.getRunProc(" Update Gy_BarCodeBill set HAuxPropID= " + DBUtility.ClsPub.isLong(txtHAuxItemID.Tag) + " Where HitemID = " + sItemID.ToString(), ref DBUtility.ClsPub.sExeReturnInfo); oWeb.getRunProc("Insert into System_log (GeginDate, userid, WorkstationName, WorkList, SystemName, NetuserName, State) select GETDATE(),'" + DBUtility.ClsPub.CurUserName + "','" + DBUtility.ClsPub.ComputerName + "','修改条码辅助属性为:" + txtHAuxItemID.Text + "','修改条码辅助属性模块','" + DBUtility.ClsPub.IPAddress + "','修改条码辅助属性'", ref DBUtility.ClsPub.sExeReturnInfo); MessageBox.Show("保存完毕"); } catch (Exception e1) { MessageBox.Show("保存失败" + e1.Message); } } private void button2_Click(object sender, EventArgs e) { this.Close(); } private void Gy_BarCodeBillEdit_Load(object sender, EventArgs e) { txtHBarCode.Text = sBarCode; oWeb.Url = SCM.ClsPub1.WEBSURL; //获取系统参数 客户定制化名称 DataSet Ds = oWeb.getDataSetBySQL("select HValue from Xt_SystemParameter with(nolock) where HKey='WMS_CampanyName'", "Xt_SystemParameter", ref DBUtility.ClsPub.sExeReturnInfo); if (Ds == null || Ds.Tables[0].Rows.Count == 0) { MessageBox.Show("获取系统参数失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示"); return; } else { CampanyName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["HValue"]); } } } }