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("GradeLevelList", "GradeLevelId"); } else { lngID = Convert.ToInt32(hfID.Value); } GradeEquiv objGrd = new GradeEquiv(lngID.ToString(), txtGrade.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "HRD", "N", "N", (chkIsActive.Checked == true ? "N" : "Y"), ""); MasMgr.InsertGradeLevel(objGrd, hfIsUpadate.Value, IsDelete, (chkIsActive.Checked == true ? "N" : "Y")); 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); } }
private void SaveData(string IsDelete) { string sId = ""; try { if (hfIsUpadate.Value == "N") { sId = Common.getMaxId("GradeList", "GradeID"); } else { sId = hfID.Value.ToString(); } GradeEquiv objGrd = new GradeEquiv(sId, txtGrade.Text.Trim(), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), "N", "N", (chkIsActive.Checked == true ? "N" : "Y"), (chkIsOTEntitle.Checked == true ? "Y" : "N")); objMasMgr.InsertGrade(grDesig, objGrd, hfIsUpadate.Value, IsDelete, (chkIsActive.Checked == true ? "N" : "Y"), "0", txtBasicMin.Text.Trim(), txtBasicMax.Text.Trim()); if (hfIsUpadate.Value == "N") { lblMsg.Text = "Record Saved Successfully"; } else { lblMsg.Text = "Record Updated Successfully"; } Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(0); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }