192 lines
7.4 KiB
C#
192 lines
7.4 KiB
C#
|
//using System;
|
|||
|
//using System.Collections.Generic;
|
|||
|
//using System.Linq;
|
|||
|
//using System.Text;
|
|||
|
//using Payroll.BO;
|
|||
|
//using Ease.CoreV35.Model;
|
|||
|
//using System.Data;
|
|||
|
//using Microsoft.Reporting.WinForms;
|
|||
|
|
|||
|
|
|||
|
//namespace Payroll.Report.Class
|
|||
|
//{
|
|||
|
// class rptTraining
|
|||
|
// {
|
|||
|
// #region Declaration & Construction
|
|||
|
|
|||
|
// ObjectsTemplate<Department> _Departments = new ObjectsTemplate<Department>();
|
|||
|
// ObjectsTemplate<Designation> _Designations = new ObjectsTemplate<Designation>();
|
|||
|
// ObjectsTemplate<Branch> _Branches = new ObjectsTemplate<Branch>();
|
|||
|
// ObjectsTemplate<Location> _Locations = new ObjectsTemplate<Location>();
|
|||
|
// ObjectsTemplate<Employee> _Employees = new ObjectsTemplate<Employee>();
|
|||
|
// public String SearchCriteria { get; set; }
|
|||
|
|
|||
|
|
|||
|
// public rptTraining()
|
|||
|
// {
|
|||
|
// _Designations = Designation.Get(EnumStatus.Regardless);
|
|||
|
// _Branches = Branch.Get(EnumStatus.Regardless);
|
|||
|
// _Locations = Location.Get();
|
|||
|
// _Departments = Department.Get();
|
|||
|
// _Employees = Employee.Get();
|
|||
|
// SearchCriteria = string.Empty;
|
|||
|
// }
|
|||
|
|
|||
|
// #endregion
|
|||
|
|
|||
|
// #region Public Functions
|
|||
|
|
|||
|
// public void ShowEmployeeWiseTrainingReport(ObjectsTemplate<SearchEmployee> Employees)
|
|||
|
// {
|
|||
|
// fReportViewer form = new fReportViewer();
|
|||
|
// DataRow dr = null;
|
|||
|
// DataSet oEmpDetails = Training.GetEmployeeWiseTrainingReport(Employees);
|
|||
|
// if (oEmpDetails.Tables[0].Rows.Count > 0)
|
|||
|
// {
|
|||
|
// GlobalFunctions.bDataFound = true;
|
|||
|
// PayrollDataSet.TrainingDataSet.IndvSoftTrainRecordDataTable dTEmpDetail = new Payroll.Report.PayrollDataSet.TrainingDataSet.IndvSoftTrainRecordDataTable();
|
|||
|
|
|||
|
// foreach (DataRow oDRow in oEmpDetails.Tables[0].Rows)
|
|||
|
// {
|
|||
|
// dr = dTEmpDetail.NewRow();
|
|||
|
|
|||
|
// dr["GEID"] = oDRow["EmployeeID"];
|
|||
|
// dr["Name"] = oDRow["EmpName"];
|
|||
|
// //dr["APACode"] = oDRow[""];
|
|||
|
// dr["TrainingName"] = oDRow["TrainingName"];
|
|||
|
// dr["TrainingSchedule"] = oDRow["StartDate"];
|
|||
|
// //dr["TotalTrainingAttnd"] = oDRow[""];
|
|||
|
// //dr["TotalTrainingRemain"] = oDRow[""];
|
|||
|
|
|||
|
// dTEmpDetail.Rows.Add(dr);
|
|||
|
// }
|
|||
|
|
|||
|
// //form.ShowDlgForTrainingSummaryReport(dTEmpDetail);
|
|||
|
// List<ReportParameter> parameters = new List<ReportParameter>();
|
|||
|
// ReportParameter parameter = new ReportParameter("CurrentYear", DateTime.Today.Year.ToString());
|
|||
|
// parameters.Add(parameter);
|
|||
|
// parameter = new ReportParameter("FilterCriteria", SearchCriteria);
|
|||
|
// parameters.Add(parameter);
|
|||
|
|
|||
|
// DataSet dSet = new DataSet();
|
|||
|
// dTEmpDetail.TableName = "TrainingDataSet_IndvSoftTrainRecord";
|
|||
|
// dSet.Tables.Add(dTEmpDetail);
|
|||
|
|
|||
|
// form.CommonReportView(null, dSet, "Payroll.Report.RDLC.IndividualSoftTraingRecord.rdlc", null);
|
|||
|
// }
|
|||
|
// else
|
|||
|
// GlobalFunctions.bDataFound = false;
|
|||
|
// }
|
|||
|
// public void ShowSoftPlanReport(DateTime year)
|
|||
|
// {
|
|||
|
// fReportViewer form = new fReportViewer();
|
|||
|
// DataRow dr = null;
|
|||
|
// string y = year.Year.ToString();
|
|||
|
// DataSet oEmpDetails = Training.ShowSoftPlanReport(y);
|
|||
|
// if (oEmpDetails.Tables[0].Rows.Count > 0)
|
|||
|
// {
|
|||
|
// GlobalFunctions.bDataFound = true;
|
|||
|
// PayrollDataSet.TrainingDataSet.dtSoftPlanDataTable dTEmpDetail = new Payroll.Report.PayrollDataSet.TrainingDataSet.dtSoftPlanDataTable();
|
|||
|
|
|||
|
// foreach (DataRow oDRow in oEmpDetails.Tables[0].Rows)
|
|||
|
// {
|
|||
|
// dr = dTEmpDetail.NewRow();
|
|||
|
|
|||
|
// if (oDRow["Duration"].ToString() == "0")
|
|||
|
// {
|
|||
|
// dr["Days"] = "N/A";
|
|||
|
// }
|
|||
|
// else
|
|||
|
// {
|
|||
|
// dr["Days"] = oDRow["Duration"];
|
|||
|
// }
|
|||
|
// dr["Name"] = oDRow["TrainingName"];
|
|||
|
|
|||
|
// dr["MaxParticipants"] = oDRow["MaxParticipants"];
|
|||
|
// dr["TrainingCost"] = oDRow["StandardCost"];
|
|||
|
// dr["YearlyAvlSession"] = oDRow["Session"];
|
|||
|
// dr["Venue"] = oDRow["Venue"];
|
|||
|
// string sDate = Convert.ToDateTime(oDRow["StartDate"]).Day.ToString();
|
|||
|
// string eDate = Convert.ToDateTime(oDRow["EndDate"]).Day.ToString();
|
|||
|
// int sMonth = Convert.ToInt32(Convert.ToDateTime(oDRow["StartDate"]).Month.ToString());
|
|||
|
|
|||
|
// switch (sMonth)
|
|||
|
// {
|
|||
|
// case 1:
|
|||
|
// dr["Jan"] = sDate+"-"+eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 2:
|
|||
|
// dr["Feb"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 3:
|
|||
|
// dr["Mar"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 4:
|
|||
|
// dr["Apr"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 5:
|
|||
|
// dr["May"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 6:
|
|||
|
// dr["Jun"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 7:
|
|||
|
// dr["Jul"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 8:
|
|||
|
// dr["Aug"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 9:
|
|||
|
// dr["Sep"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 10:
|
|||
|
// dr["Oct"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 11:
|
|||
|
// dr["Nov"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
|
|||
|
// case 12:
|
|||
|
// dr["Dec"] = sDate + "-" + eDate;
|
|||
|
// break;
|
|||
|
// default:
|
|||
|
// break;
|
|||
|
|
|||
|
|
|||
|
// }
|
|||
|
|
|||
|
// dTEmpDetail.Rows.Add(dr);
|
|||
|
// }
|
|||
|
|
|||
|
// //form.ShowDlgForTrainingSummaryReport(dTEmpDetail);
|
|||
|
// List<ReportParameter> parameters = new List<ReportParameter>();
|
|||
|
// ReportParameter parameter = new ReportParameter("CurrentYear", y);
|
|||
|
// parameters.Add(parameter);
|
|||
|
// //parameter = new ReportParameter("FilterCriteria", SearchCriteria);
|
|||
|
// //parameters.Add(parameter);
|
|||
|
|
|||
|
// DataSet dSet = new DataSet();
|
|||
|
// dTEmpDetail.TableName = "TrainingDataSet_dtSoftPlan";
|
|||
|
// dSet.Tables.Add(dTEmpDetail);
|
|||
|
|
|||
|
// form.CommonReportView(null, dSet, "Payroll.Report.RDLC.SoftPlanReport.rdlc", parameters);
|
|||
|
// }
|
|||
|
// else
|
|||
|
// GlobalFunctions.bDataFound = false;
|
|||
|
// }
|
|||
|
// #endregion
|
|||
|
|
|||
|
|
|||
|
// }
|
|||
|
//}
|