private void SaveData(string IsDelete) { long lngID = 0; try { //Filling Class Properties with values if (hfIsUpdate.Value == "N") { lngID = objDB.GerMaxIDNumber("ActionList", "ActionId"); } else { lngID = Convert.ToInt32(hfID.Value); } clsAction objAction = new clsAction(lngID.ToString(), txtAction.Text.Trim(), txtDescription.Text.Trim(), txtActionType.Text.Trim(), ddlActionNature.SelectedValue.ToString(), (chkIsActive.Checked == true ? "N" : "Y"), "N", Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString())); objMasMgr.InsertAction(objAction, hfIsUpdate.Value, IsDelete); if (hfIsUpdate.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); } }