Exemplo n.º 1
0
        protected void imgButtonEidt_Click(object sender, EventArgs e)
        {
            ImageButton imgbtn = (ImageButton)sender;
            GridViewRow row    = (GridViewRow)imgbtn.NamingContainer;

            try
            {
                Label    lblBuyerId  = (Label)grdStyle.Rows[row.RowIndex].FindControl("lblByerId");
                int      ByeryId     = Convert.ToInt16(lblBuyerId.Text);
                LC_Style _buyerSetup = _Buyerbll.GetStyleById(ByeryId);
                if (_buyerSetup != null)
                {
                    hidBueyId.Value = _buyerSetup.StyleId.ToString();

                    txtStyle.Text              = _buyerSetup.StyleName;
                    txtSpecification.Text      = _buyerSetup.Specification;
                    txtHSCode.Text             = _buyerSetup.HS_Code;
                    txtMenLadies.Text          = _buyerSetup.MenLadies;
                    txtTopBottom.Text          = _buyerSetup.TopBottom;
                    txtProductDescription.Text = _buyerSetup.ProductDescription;
                    txtFabrics.Text            = _buyerSetup.Fabrics;
                    txtAccessories.Text        = _buyerSetup.Accessories;
                    ddlCountry.SelectedValue   = Convert.ToString(_buyerSetup.CountryOfProduction);
                    txtPrice.Text              = Convert.ToString(_buyerSetup.Price);
                }
                btnSave.Text = "Update";
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemplo n.º 2
0
        protected void imgButtonEidt_Click(object sender, EventArgs e)
        {
            ImageButton imgbtn = (ImageButton)sender;
            GridViewRow row    = (GridViewRow)imgbtn.NamingContainer;

            try
            {
                Label    lblBuyerId  = (Label)grdStyle.Rows[row.RowIndex].FindControl("lblByerId");
                int      ByeryId     = Convert.ToInt16(lblBuyerId.Text);
                LC_Style _buyerSetup = _Buyerbll.GetStyleById(ByeryId);
                if (_buyerSetup != null)
                {
                    txtStyle.Text         = _buyerSetup.StyleName;
                    txtSpecification.Text = _buyerSetup.Specification;
                    txtHSCode.Text        = _buyerSetup.HS_Code;
                    txtCAT.Text           = _buyerSetup.CAT;
                    //FileUpload1.FileBytes=_buyerSetup.Style_Photo.;
                    byte[] picUp = SetImage();
                    picUp            = _buyerSetup.Style_Photo;
                    Session["picUp"] = picUp;

                    hidBueyId.Value = _buyerSetup.StyleId.ToString();
                }
                btnSave.Text = "Update";
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }