コード例 #1
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();
        }