コード例 #1
0
        protected void imgButtonEidt_Click(object sender, EventArgs e)
        {
            ImageButton imgbtn = (ImageButton)sender;
            GridViewRow row    = (GridViewRow)imgbtn.NamingContainer;

            try
            {
                Label          lblFinishGoods_Id = (Label)grdFinishGoods.Rows[row.RowIndex].FindControl("lblFinishGoods_Id");
                int            FinishGoods_Id    = Convert.ToInt16(lblFinishGoods_Id.Text);
                LC_FinishGoods _FinishGoodsSetup = _Buyerbll.GetFinishGoodsById(FinishGoods_Id);
                if (_FinishGoodsSetup != null)
                {
                    txtFinishGoods.Text = _FinishGoodsSetup.FinishGoods_Name;

                    hidFinishGoods_Id.Value = _FinishGoodsSetup.FinishGoods_Id.ToString();
                }
                btnSave.Text = "Update";
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }