示例#1
0
        /*Prodcut Specification*/
        protected void GetProductSpecificationDetailByProductID()
        {
            CustomProfile profile = CustomProfile.GetProfile();

            if (hdnprodID.Value == "")
            {
                hdnprodID.Value = "0";
            }
            iProductMasterClient productClient = new iProductMasterClient();

            GVProductSpecification.DataSource = productClient.GetProductSpecificationDetailByProductID(Convert.ToInt64(hdnprodID.Value), Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);
            GVProductSpecification.DataBind();
            productClient.Close();
        }
示例#2
0
 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
     {
     }
 }
示例#3
0
        protected void clear()
        {
            CustomProfile profile = CustomProfile.GetProfile();

            // ddlProductType.SelectedIndex = -1;
            //ddlCategory.SelectedIndex = -1;
            // ddlSubCategory.SelectedIndex = -1;
            txtProductCode.Text = "";
            txtProductName.Text = "";
            // ddlUOM.SelectedIndex = -1;
            //txtPrincipalPrice.Text = "";
            //txtFixedDisc.Text = "";
            //chkboxFixedDiscIsPercent.Checked = false;
            //chkProductSpe.Items[0].Selected = false;
            //chkProductSpe.Items[1].Selected = false;
            //txtWarrenyInDays.Text = "0";
            //txtGuaranteeInDays.Text = "0";
            //txtOpeningBalance.Text = "";
            //txtCurrentBalance.Text = "";
            //txtReorderLevel.Text = "";
            //txtMaxBalanceQuantity.Text = "";
            //txtMinOrderQuantity.Text = "";
            //txtLeadTimeInDays.Text = "";
            hdnprodID.Value = null;

            GVImages.DataSource = null;
            GVImages.DataBind();

            GVProductSpecification.DataSource = null;
            GVProductSpecification.DataBind();

            GVTaxSetup.DataSource = null;
            GVTaxSetup.DataBind();

            iProductMasterClient productClient = new iProductMasterClient();

            productClient.ClearTempSaveProductSpecificationDetailBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);

            productClient.ClearTempSaveProductTaxDetailBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);

            productClient.ClearTempSaveProductImagesBySessionID(Session.SessionID.ToString(), profile.Personal.UserID.ToString(), profile.DBConnection._constr);

            productClient.Close();
            ResetUserControl();
        }