Example #1
0
        protected void BtnInsert_Click(object sender, EventArgs e)
        {
            ClCompany cl = new ClCompany();

            cl = Data;
            int i = 0;

            if (LblParamCompanyID.Text == "0")
            {
                i = CompanyClass.insert(cl);
            }
            else
            {
                i = CompanyClass.Update(cl);
            }



            if (i.ToString() == "0")
            {
                Utility.ShowMsg(Page, ProPertyData.MsgType.General_Fault, "ثبت با خطا مواجه شد");
            }
            else
            {
                // Utility.ShowMsg(Page, ProPertyData.MsgType.General_Success, "ثبت با موفقیت انجام شد.");
                //Session["CompanyID"] = LblParamCompanyID.Text;
                BindGrid();
                LightBox.Value = "0";
            }
            LblParamCompanyID.Text = "0";
        }