protected void btnSubmit_Click(object sender, System.EventArgs e) { string Prime = "", Express = "", Regular = "", DID = ""; CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.AccountSearchService.iCustomerClient cust = new iCustomerClient(); mSLA sla = new mSLA(); if (txtPrime.Text == "NA") { Prime = "0"; } else { Prime = txtPrime.Text; } if (txtExpress.Text == "NA") { Express = "0"; } else { Express = txtExpress.Text; } if (txtRegular.Text == "NA") { Regular = "0"; } else { Regular = txtRegular.Text; } if (hdndeptid.Value == "NA") { DID = "0"; } else { DID = hdndeptid.Value; } sla.PrimeDays = long.Parse(Prime); sla.ExpressDays = long.Parse(Express); sla.RegularDays = long.Parse(Regular); sla.DeptID = long.Parse(DID); sla.CreatedBy = profile.Personal.UserID; sla.CreatedDate = DateTime.Now; cust.AddIntomSLA(sla, profile.DBConnection._constr); Response.Write("<script>window.close();</" + "script>"); Response.End(); }
public static int WMAddIntomSLA(string Prime, string Express, string Regular, string DID) { CustomProfile profile = CustomProfile.GetProfile(); BrilliantWMS.AccountSearchService.iCustomerClient cust = new iCustomerClient(); mSLA sla = new mSLA(); sla.DeptID = long.Parse(DID); long Pr = 0, Exp = 0, Reg = 0; if (Prime == "NA") { Pr = 0; } else { Pr = Convert.ToInt64(Prime); } if (Express == "NA") { Exp = 0; } else { Exp = Convert.ToInt64(Express); } if (Regular == "NA") { Reg = 0; } else { Reg = Convert.ToInt64(Regular); } sla.PrimeDays = Pr; sla.ExpressDays = Exp; sla.RegularDays = Reg; sla.CreatedBy = profile.Personal.UserID; sla.CreatedDate = DateTime.Now; cust.AddIntomSLA(sla, profile.DBConnection._constr); return(1); }