private void SaveData(string IsDelete) { string sId = ""; try { if (hfIsUpdate.Value == "N") { sId = Common.getMaxId("LeaveTakenBarrier", "Id"); } else { sId = hfId.Value.ToString(); } objLeaveMgr.InsertLeaveTakenMatrix(sId, ddlPLeaveType.SelectedValue.ToString(), ddlNLeaveType.SelectedValue.ToString(), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()), hfIsUpdate.Value.ToString(), IsDelete); Common.GetMessage(hfIsUpdate.Value, IsDelete); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }