protected void BtnSubMitproductSp_Click(object sender, EventArgs e) { try { //iProductMasterClient productClient = new iProductMasterClient(); iProductMasterClient productClient = new iProductMasterClient(); List <mProductSpecificationDetail> ProductSpecificationDetail = new List <mProductSpecificationDetail>(); CustomProfile profile = CustomProfile.GetProfile(); mProductSpecificationDetail oprodspec = new mProductSpecificationDetail(); if (Hndstate.Value == "Edit") { oprodspec = productClient.GetSpecificationDetailFromTempTableBySequence(Session.SessionID, profile.Personal.UserID.ToString(), 0, Convert.ToInt16(hndsequence.Value), profile.DBConnection._constr); oprodspec.Sequence = Convert.ToInt64(hndsequence.Value); } else { oprodspec.Sequence = 0; } oprodspec.SpecificationTitle = txtspecificationtitle.Text;; oprodspec.SpecificationDescription = txtSpecificationDesc.Text; oprodspec.Active = "Y"; oprodspec.ProductID = Convert.ToInt32(hdnprodID.Value); oprodspec.CreatedBy = profile.Personal.UserID.ToString(); //need to change oprodspec.CreationDate = DateTime.Now; oprodspec.CompanyID = profile.Personal.CompanyID; // need to change //int upprodsperesult = productClient.InserttProductSpecificationDetail(oprodspec, profile.DBConnection._constr); if (Hndstate.Value == "Edit") { ProductSpecificationDetail = productClient.SetValuesToTempData_onChange(0, Session.SessionID, profile.Personal.UserID.ToString(), profile.DBConnection._constr, Convert.ToInt16(hndsequence.Value), oprodspec).ToList(); } else { ProductSpecificationDetail = productClient.AddProductSpecificationToTempData(oprodspec, Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr).ToList(); } GVProductSpecification.DataSource = ProductSpecificationDetail; GVProductSpecification.DataBind(); productClient.Close(); Hndstate.Value = ""; clr(); } catch (System.Exception ex) { Login.Profile.ErrorHandling(ex, this, "Productmaster", "BtnSubmit_Click"); } finally { } }
protected void GVProductSpecification_InsertRecord(object sender, Obout.Grid.GridRecordEventArgs e) { CustomProfile profile = CustomProfile.GetProfile(); mProductSpecificationDetail oprodspec = new mProductSpecificationDetail(); oprodspec.SpecificationTitle = e.Record["SpecificationTitle"].ToString(); oprodspec.SpecificationDescription = e.Record["SpecificationDescription"].ToString(); oprodspec.Active = "Y"; oprodspec.ProductID = Convert.ToInt32(hdnprodID.Value); oprodspec.CreatedBy = profile.Personal.UserID.ToString(); //need to change oprodspec.CreationDate = DateTime.Now; oprodspec.CompanyID = profile.Personal.CompanyID; // need to change //int upprodsperesult = productClient.InserttProductSpecificationDetail(oprodspec, profile.DBConnection._constr); iProductMasterClient productClient = new iProductMasterClient(); productClient.AddProductSpecificationToTempData(oprodspec, Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr); productClient.Close(); }