protected void btn_Reject_Click(object sender, EventArgs e) { try { CheckBox chkBox = new CheckBox(); Label lblID = new Label(); int index; int i = 0; string str = ""; for (index = 0; index <= RG_ResgApproval.Items.Count - 1; index++) { chkBox = RG_ResgApproval.Items[index].FindControl("chk_Choose") as CheckBox; lblID = RG_ResgApproval.Items[index].FindControl("lblresgID") as Label; if (chkBox.Checked) { if (str == "") { str = "" + lblID.Text + ""; } else { str = str + "," + lblID.Text + ""; } } else { i = i + 1; } } if (i == RG_ResgApproval.Items.Count) { BLL.ShowMessage(this, "Please Select Employees"); return; } bool status = false; _obj_smhr_Resg = new SMHR_EMPRESIGNATION(); _obj_smhr_Resg.EMPREG_STATUS = 2; _obj_smhr_Resg.EMPREG_REMARKS = str; _obj_smhr_Resg.EMPREG_APPROVEDBY = Convert.ToInt32(rtxt_ReportingMgr.Text); _obj_smhr_Resg.EMPREG_APPROVEDDATE = Convert.ToDateTime(rdp_ApprovalDate.SelectedDate.Value); _obj_smhr_Resg.LASTMDFBY = Convert.ToInt32(Session["USER_ID"]); _obj_smhr_Resg.LASTMDFDATE = DateTime.Now; _obj_smhr_Resg.OPERATION = operation.Update; status = BLL.set_Empresignation(_obj_smhr_Resg); if (status == true) { BLL.ShowMessage(this, "Selected Employee Resignations Rejected"); LoadData(); RG_ResgApproval.DataBind(); return; } } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResignationApproval", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }
protected void btn_Refresh_Click(object sender, EventArgs e) { try { LoadData(); RG_ResgApproval.DataBind(); } catch (Exception ex) { SMHR.BLL.Error_Log(Session["USER_ID"].ToString(), ex.TargetSite.ToString(), ex.Message.Replace("'", "''"), "frm_ResignationApproval", ex.StackTrace, DateTime.Now); Response.Redirect("~/Frm_ErrorPage.aspx"); } }