private void SaveData(string IsDelete) { try { if (ValidateAndSave("Save") == false) { return; } if (hfIsUpdate.Value == "Y") { hfId.Value = hfId.Value; } else { hfId.Value = Common.getMaxId("TrTrainingList", "TrainId"); } clsTrTrainingList objCommonSetup = new clsTrTrainingList( hfId.Value.ToString(), txtName.Text.Trim(), ddlCategoty.SelectedValue.ToString(), txtTentativeDays.Text.ToString(), ddlInOut.SelectedValue.ToString(), ddlMedicos.SelectedValue.ToString(), txtCostPP.Text.Trim(), txtIncomePP.Text.Trim(), Session["USERID"].ToString(), Common.SetDateTime(DateTime.Now.ToString()) ); objEmpMgr.InsertTrainingList(grList, objCommonSetup, (chkInActive.Checked == true ? "N" : "Y"), hfIsUpdate.Value, IsDelete); lblMsg.Text = Common.GetMessage(hfIsUpdate.Value.ToString(), IsDelete); Common.EmptyTextBoxValues(this); this.EntryMode(false); this.OpenRecord(); grList.DataSource = null; grList.DataBind(); this.LoadTrainingGrid(); } catch (Exception ex) { lblMsg.Text = ""; throw (ex); } }