private void SaveData(string IsDelete) { long lngID = 0; try { MasterTablesManager MasMgr = new MasterTablesManager(); //Filling Class Properties with values if (hfIsUpadate.Value == "N") { lngID = objDB.GerMaxIDNumber("RegionList", "RegionId"); } else { lngID = Convert.ToInt32(hfID.Value); } clsCommonSetup objCnt = new clsCommonSetup(lngID.ToString(), txtName.Text.Trim(), (ChkIsActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), hfIsUpadate.Value.ToString(), "N"); MasMgr.InserRegionList(objCnt, hfIsUpadate.Value, IsDelete); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }