void LoadEmployeeEvaluation(double empID, string fromDate) { try { ATTEmployeeEvaluation eval = BLLEmployeeEvaluation.GetEmployeeEvaluation(empID, fromDate); if (eval == null) { return; } this.txtFromDate_rdt.Text = eval.EvalFromDate; this.txtToDate_rdt.Text = eval.EvalToDate; this.txtRegNO_rqd.Text = eval.RegistrationNo.ToString(); this.txtOrganization_rqd.Text = eval.Organization; this.txtSubmitedDate_rdt.Text = eval.SubmitedDate; this.hdnOldDate.Value = eval.OldEvalFromDate; this.grdEmployeeWork.DataSource = eval.LstEmployeeWork; this.grdEmployeeWork.DataBind(); this.grdEvaluaitonDetail.DataSource = eval.LstEvaluationDetail; this.grdEvaluaitonDetail.DataBind(); this.grdEvaluator.DataSource = eval.LstEmployeeEvaluator; this.grdEvaluator.DataBind(); Session["EmployeeEvaluation"] = eval; this.hdnMode.Value = "E"; this.txtFromDate_rdt.Enabled = false; } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }
void LoadEmployeeEvaluationList() { try { List <ATTEmployeeEvaluation> lst = BLLEmployeeEvaluation.GetEmployeeEvaluationList(double.Parse(this.lblEmpID.Text), ""); if (lst.Count > 0) { this.pnlEvaluationList.GroupingText = "हाल सम्मको मुल्यांकनहरु"; this.dlstEvaluation.DataSource = lst; this.dlstEvaluation.DataBind(); } else { this.pnlEvaluationList.GroupingText = "यस कर्मचारीको हाल सम्म कुनै पनि मुल्यांकन गरिएको छैन! क्रिपया नया मुल्यांकन गर्नुहोस!"; this.dlstEvaluation.DataSource = ""; this.dlstEvaluation.DataBind(); } } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }
protected void lnkSelectEvaluation_Click(object sender, EventArgs e) { double empID = double.Parse(((LinkButton)sender).CommandArgument); char[] Token = { ':' }; string fromDate = ((LinkButton)sender).CommandName.Split(Token)[0]; string ToDate = ((LinkButton)sender).CommandName.Split(Token)[1]; CrystalReport report = new CrystalReport(); report.ReportName = Server.MapPath("~") + "/MODULES/PMS/REPORTS/EmployeeEvaluation.rpt"; report.SelectionCriteria = "{EMPLOYEE_EVALUATION.EMP_ID}=" + empID.ToString() + " and {EMPLOYEE_EVALUATION.EVAL_FROM_DATE}='" + fromDate + "'"; report.UserID = "PMS_ADMIN"; report.Password = "******"; Session["PMSReport"] = report; Session["PmsReportTitle"] = null; Session["PmsReportTitle"] = "PMS | Employee Medical Expenses Report"; report.ParamList.Add(new ReportParameter("OrgList", BLLEmployeeEvaluation.GetEmployeeTransferedOrg(empID, fromDate, ToDate))); SubReport EmpEvalDetail1 = new SubReport(); EmpEvalDetail1.SubReportName = "EmpEvalDetail1.rpt"; EmpEvalDetail1.ParamList.Add(new ReportParameter("P_EMP_ID", empID)); EmpEvalDetail1.ParamList.Add(new ReportParameter("P_EVAL_FROM_DATE", fromDate)); EmpEvalDetail1.ParamList.Add(new ReportParameter("p_CONTAIN_SAMITI", "N")); SubReport EmpEvalDetail2 = new SubReport(); EmpEvalDetail2.SubReportName = "EmpEvalDetail2.rpt"; EmpEvalDetail2.ParamList.Add(new ReportParameter("P_EMP_ID", empID)); EmpEvalDetail2.ParamList.Add(new ReportParameter("P_EVAL_FROM_DATE", fromDate)); EmpEvalDetail2.ParamList.Add(new ReportParameter("p_CONTAIN_SAMITI", "Y")); SubReport EvaluatorSamiti = new SubReport(); EvaluatorSamiti.SubReportName = "EvaluatorSamiti.rpt"; EvaluatorSamiti.ParamList.Add(new ReportParameter("P_EMP_ID", empID)); EvaluatorSamiti.ParamList.Add(new ReportParameter("P_EVAL_FROM_DATE", fromDate)); SubReport EvaluatorInspector = new SubReport(); EvaluatorInspector.SubReportName = "EvaluatorInspector.rpt"; EvaluatorInspector.ParamList.Add(new ReportParameter("P_EMP_ID", empID)); EvaluatorInspector.ParamList.Add(new ReportParameter("P_EVAL_FROM_DATE", fromDate)); SubReport EvaluatorPunarawolokan = new SubReport(); EvaluatorPunarawolokan.SubReportName = "EvaluatorPunarawolokan.rpt"; EvaluatorPunarawolokan.ParamList.Add(new ReportParameter("P_EMP_ID", empID)); EvaluatorPunarawolokan.ParamList.Add(new ReportParameter("P_EVAL_FROM_DATE", fromDate)); report.SubReportList.Add(EmpEvalDetail1); report.SubReportList.Add(EmpEvalDetail2); report.SubReportList.Add(EvaluatorSamiti); report.SubReportList.Add(EvaluatorInspector); report.SubReportList.Add(EvaluatorPunarawolokan); Session["PMSReport"] = report; string script = ""; script += "<script language='javascript' type='text/javascript'>"; script += "var win=window.open('./CommonReportViewer.aspx', 'popup','width=802,height=500,directories=no,location=no,menubar=no,resizable=1,scrollbars=1,status=no,toolbar=no');"; script += "</script>"; ClientScript.RegisterClientScriptBlock(this.GetType(), "PCS", script); }
protected void btnSubmit_Click(object sender, EventArgs e) { if (this.grdEmployee.SelectedIndex < 0) { this.lblStatusMessage.Text = "Please select any employee from list."; this.programmaticModalPopup.Show(); return; } ATTEmployeeEvaluation eval = (ATTEmployeeEvaluation)Session["EmployeeEvaluation"]; eval.EmpID = int.Parse(this.lblEmpID.Text); eval.EvalFromDate = this.txtFromDate_rdt.Text; eval.EvalToDate = this.txtToDate_rdt.Text; eval.RegistrationNo = double.Parse(this.txtRegNO_rqd.Text); eval.Organization = this.txtOrganization_rqd.Text; eval.SubmitedDate = this.txtSubmitedDate_rdt.Text; if (this.hdnMode.Value == "E") { eval.Action = "E"; eval.OldEvalFromDate = this.hdnOldDate.Value; } else { eval.Action = "A"; } eval.EntryBy = ((ATTUserLogin)Session["Login_User_Detail"]).UserName; ObjectValidation evalResult = BLLEmployeeEvaluation.Validate(eval); if (evalResult.IsValid == false) { this.lblStatusMessage.Text = evalResult.ErrorMessage; this.programmaticModalPopup.Show(); return; } try { BLLEmployeeEvaluation.AddEmployeeEvaluation(eval); //eval.LstEvaluationDetail.RemoveAll // ( // delegate(ATTEmployeeEvaluationDetail de) // { // return de.Action == "D"; // } // ); this.ClearWork(); this.grdEmployeeWork.SelectedIndex = -1; this.grdEvaluaitonDetail.SelectedIndex = -1; this.grdEmployee.SelectedIndex = -1; this.grdEvaluator.SelectedIndex = -1; this.ClearEvaluation(); this.EvaluationTab.ActiveTabIndex = 0; this.lblPersonName.Text = ""; this.colEmployee.Collapsed = true; this.colEmployee.ClientState = "true"; this.lblStatusMessage.Text = "Employee Evaluation Saved Successfully."; this.programmaticModalPopup.Show(); } catch (Exception ex) { this.lblStatusMessage.Text = ex.Message; this.programmaticModalPopup.Show(); } }