protected void btnSubmit3_Click(object sender, EventArgs e) { List <ATTRetirement> LSTRetAppr = (List <ATTRetirement>)Session["EmpRetirementAppl"]; try { if (LSTRetAppr.Count != 0) { if (BLLRetirement.SaveEmpRetirement(LSTRetAppr)) { this.lblStatusMessage.Text = "Retirement Approved"; this.programmaticModalPopup.Show(); } } else if (LSTRetAppr.Count == 0) { this.lblStatusMessage.Text = "No Data To Save"; this.programmaticModalPopup.Show(); } } catch (Exception ex) { throw ex; } }
protected void btnSubmit_Click(object sender, EventArgs e) { List <ATTRetirement> LSTRetAppl = (List <ATTRetirement>)Session["EmpRetirementAppl"]; if (LSTRetAppl.Count == 0) { this.lblStatusMessage.Text = "**Sorry No Data To Save"; this.programmaticModalPopup.Show(); return; } else { try { if (BLLRetirement.SaveEmpRetirement(LSTRetAppl)) { this.lblStatusMessage.Text = "Employee Retirement Saved Successfully."; this.programmaticModalPopup.Show(); this.grdRetirementData.DataSource = null; this.grdRetirementData.DataBind(); ClearControls(2); } } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message.ToString(); this.programmaticModalPopup.Show(); } } }
protected void btnSearch_Click(object sender, EventArgs e) { List <ATTRetirement> lst; this.lblSearch.Text = ""; if (this.txtFName.Text.Trim() == "" && this.txtMName.Text.Trim() == "" && this.txtSurName.Text.Trim() == "" && this.ddlGender.SelectedIndex == 0 && this.txtDOB.Text.Trim() == "" && this.ddlMarStatus.SelectedIndex == 0 && this.ddlOrganization.SelectedIndex == 0 && this.ddlDesignation.SelectedIndex == 0) { this.lblStatusMessage.Text = "All Fields Cannot Be Empty."; this.programmaticModalPopup.Show(); } else { try { Session["EmpSearchResult"] = BLLRetirement.SearchEmployee(GetFilter()); lst = (List <ATTRetirement>)Session["EmpSearchResult"]; this.lblSearch.Text = lst.Count.ToString() + " records found."; this.grdEmployee.DataSource = lst; this.grdEmployee.DataBind(); } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } } }
private void LoadRetirmentApplication() { List <ATTRetirement> LSTRetAppl = BLLRetirement.GetEmployeeRetirement(GetFilterAppl(), "appl"); Session["EmpRetirementAppl"] = LSTRetAppl; this.grdRetirementData.DataSource = LSTRetAppl; this.grdRetirementData.DataBind(); }
protected void TabContainerRetirement_ActiveTabChanged(object sender, EventArgs e) { this.grdEmployee.SelectedIndex = -1; if (this.TabContainerRetirement.ActiveTabIndex == 0) { List <ATTRetirement> LSTRetDec = BLLRetirement.GetEmployeeRetirement(GetFilterAppl(), "appl"); this.grdRetirementData.DataSource = LSTRetDec; this.grdRetirementData.DataBind(); } if (this.TabContainerRetirement.ActiveTabIndex == 1) { List <ATTRetirement> LSTRetDec = BLLRetirement.GetEmployeeRetirement(GetFilterDec(), "dec"); this.grdRetirementData.DataSource = LSTRetDec; this.grdRetirementData.DataBind(); } else if (this.TabContainerRetirement.ActiveTabIndex == 2) { List <ATTRetirement> LSTRetAppr = BLLRetirement.GetEmployeeRetirement(GetFilterAppr(), "appr"); Session["EmpRetAppr"] = LSTRetAppr; this.grdRetirementData.DataSource = LSTRetAppr; this.grdRetirementData.DataBind(); } }
protected void btnSubmit2_Click(object sender, EventArgs e) { List <ATTRetirement> LSTRetDec = (List <ATTRetirement>)Session["EmpRetirementAppl"]; try { int index = 0; foreach (GridViewRow rw in this.grdRetirementData.Rows) { if (((CheckBox)rw.FindControl("chk")).Checked == true) { LSTRetDec[index].empID = int.Parse(LSTRetDec[index].empID.ToString()); LSTRetDec[index].desID = int.Parse(LSTRetDec[index].desID.ToString()); LSTRetDec[index].postID = int.Parse(LSTRetDec[index].postID.ToString()); LSTRetDec[index].createdDate = LSTRetDec[index].createdDate.ToString(); LSTRetDec[index].fromDate = LSTRetDec[index].fromDate.ToString(); LSTRetDec[index].retirementDate = LSTRetDec[index].retirementDate.ToString(); LSTRetDec[index].decisionBy = int.Parse(this.txtDecName.Attributes["ID"].ToString()); LSTRetDec[index].decisionDate = this.txtDecDate.Text; LSTRetDec[index].decisionDesc = this.txtDecDexcription.Text; if (this.chkDecision.Checked == true) { LSTRetDec[index].isDecided = "Y"; } else { LSTRetDec[index].isDecided = "N"; } LSTRetDec[index].isApproved = "N"; LSTRetDec[index].action = "E"; LSTRetDec[index].entryBy = Session["UserName"].ToString(); } index++; } if (LSTRetDec.Count == 0) { this.lblStatusMessage.Text = "No Data To Save"; this.programmaticModalPopup.Show(); return; } if (BLLRetirement.SaveEmpRetirement(LSTRetDec)) { this.lblStatusMessage.Text = "Retirement Decision Saved"; this.programmaticModalPopup.Show(); //List<ATTRetirement> lstRet = new List<ATTRetirement>(); //ATTRetirement obj = new ATTRetirement(); //obj.isDecided = "N"; //obj.isApproved = "N"; //lstRet=BLLRetirement.GetEmployeeRetirement(obj, "dec"); //this.grdRetirementData.DataSource = lstRet; //this.grdRetirementData.DataBind(); } ClearControls(4); } catch (Exception ex) { throw ex; } }