protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                LC_FinishGoods _FinishGoods = new LC_FinishGoods();
                _FinishGoods.FinishGoods_Name = txtFinishGoods.Text;
                _FinishGoods.CreateDate       = DateTime.Today;
                _FinishGoods.CreateUser       = (((SessionUser)Session["SessionUser"]).UserId);
                _FinishGoods.OCode            = Convert.ToString(((SessionUser)Session["SessionUser"]).OCode);



                if (btnSave.Text != "Update")
                {
                    int result = _Buyerbll.InsertFinishGoods(_FinishGoods);
                    if (result == 1)
                    {
                        ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Finish Goods Saved Successfully')", true);
                    }
                }
                else
                {
                    _FinishGoods.FinishGoods_Id = Convert.ToInt16(hidFinishGoods_Id.Value);
                    _FinishGoods.EditUser       = (((SessionUser)Session["SessionUser"]).UserId);;
                    int result = _Buyerbll.UpdateFinishGoods(_FinishGoods);
                    if (result == 1)
                    {
                        ScriptManager.RegisterStartupScript(this.Page, Page.GetType(), "text", "func('Finish Goods Updated Successfully')", true);
                    }
                }
                GetFinishGoodsList();
                ClearAllController();
            }
            catch (Exception)
            {
                throw;
            }
        }