Ejemplo n.º 1
0
        protected void btnnext_Click(object sender, EventArgs e)
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            try
            {
                ds = productClient.GetPriceImportData(DeptID, profile.DBConnection._constr);
                dt = ds.Tables[0];
                for (int i = 0; i <= ds.Tables[0].Rows.Count - 1; i++)
                {
                    string  SkuCode = ds.Tables[0].Rows[i]["SKUCode"].ToString();
                    decimal Price   = decimal.Parse(ds.Tables[0].Rows[i]["Price"].ToString());
                    productClient.UpdateImportSkuPrice(SkuCode, Price, DeptID, profile.DBConnection._constr);
                }
                productClient.DeleteSKUPricetemp(profile.DBConnection._constr);
                Response.Redirect("ImportPriceF.aspx");
            }
            catch
            {
                productClient.DeleteSKUPricetemp(profile.DBConnection._constr);
            }
            finally
            {
                productClient.Close();
            }
        }
Ejemplo n.º 2
0
        public void DisplayGrid()
        {
            iProductMasterClient productClient = new iProductMasterClient();
            CustomProfile        profile       = CustomProfile.GetProfile();

            ds = productClient.GetPriceImportData(DeptID, profile.DBConnection._constr);
            dt = ds.Tables[0];
            if (dt.Rows.Count > 0)
            {
                GVImportView.DataSource = ds.Tables[0];
                GVImportView.DataBind();
            }
            else
            {
                value = 3;
            }
            if (value == 0)
            {
                btnnext.Enabled     = false;
                btnnext.CssClass    = "class1";
                lblbackMessage.Text = "Colored Row SKU not Available in OMS.Please click on Back Button";
            }
            else if (value == 2)
            {
                btnnext.Enabled     = false;
                btnnext.CssClass    = "class1";
                lblbackMessage.Text = "Characters and blank values not asccepted in Price columns";
            }
            else if (value == 3)
            {
                btnnext.Enabled     = false;
                btnnext.CssClass    = "class1";
                lblbackMessage.Text = "Please Select Correct Company and department for Uploading SKU price";
            }
            else
            {
                lblOkMessage.Text = "All data are verified.Please click on Next Button ";
                btnnext.Enabled   = true;
                btnnext.CssClass  = "class2";
            }
        }