public static int SaveINProductClass2(INProductClass2 info) { return ConnectDB.ExecuteScalar("sp_INProductClass2Save", new String[] { "VendID", "ClassID1", "ClassID2", "Descr", "DfltTaxID", "DfltWhID", "POUnit", "SOUnit", "INUnit", "Crtd_DateTime", "Crtd_Prog", "Crtd_User", "LUpd_DateTime", "LUpd_Prog", "LUpd_User" }, new Object[] { info.VendID, info.ClassID1, info.ClassID2, info.Descr, info.DfltTaxID, info.DfltWhID, info.POUnit, info.SOUnit, info.INUnit, info.Crtd_DateTime, info.Crtd_Prog, info.Crtd_User, info.LUpd_DateTime, info.LUpd_Prog, info.LUpd_User }); }
public static INProductClass2 Class2toInfo(DataRow dr) { INProductClass2 info = new INProductClass2(); info.VendID = dr["VendID"].ToString(); info.ClassID1 = dr["ClassID1"].ToString(); info.ClassID2 = dr["ClassID2"].ToString(); info.POUnit = dr["POUnit"].ToString(); info.SOUnit = dr["SOUnit"].ToString(); info.DfltTaxID = dr["DfltTaxID"].ToString(); info.DfltWhID = dr["DfltWhID"].ToString(); return info; }
private void _SetClass2ToPanel(INProductClass2 info) { txtDfltWhID.Text = info.DfltWhID; txtTaxID.Text = info.DfltTaxID; txtPOUnit.Text = info.POUnit; txtSOUnit.Text = info.SOUnit; txtVendID.Text = info.VendID; txtClassID1.Text = info.ClassID1; }
private INProductClass2 _GetClass2Info(string classid) { INProductClass2 productclass2 = new INProductClass2(); DataRow[] dr = _dtINProductClass2.Select("ClassID2 = '" + classid + "'"); if (dr.Count() > 0) productclass2 = IN106Ctrl.Class2toInfo(dr[0]); else productclass2 = null; return productclass2; }
private void txtClassID2_TextChanged(object sender, EventArgs e) { string text = txtClassID2.Text.Trim(); if (text != "") { INProductClass2 class2 = new INProductClass2(); class2 = _GetClass2Info(text); if (class2 != null) _SetClass2ToPanel(class2); } }