Ejemplo n.º 1
0
        /// <summary>
        /// Create report
        /// </summary>
        /// <returns></returns>
        private XtraReport CreateReport()
        {
            // init report
            //var report = new XtraReport();
            // init report
            if (Enum.TryParse(Request.QueryString["rp"], true, out ReportTypeHJM rpType))
            {
                switch (rpType)
                {
                //Curriculum
                case ReportTypeHJM.CurriculumVitae:
                    var report = new rp_PrintCurriculumVitae();
                    // get report filter
                    var filter = ((IBaseReport)report).GetFilter();

                    // set filter props
                    filter.Departments = Request.QueryString["departments"];
                    filter.RecordIds   = Request.QueryString["recordIds"];
                    filter.ReportDate  = DateTime.Now;
                    // update filter report
                    ((IBaseReport)report).SetFilter(filter);

                    // bind data
                    ((IBaseReport)report).BindData();
                    return(report);

                //info employee detail 2C
                case ReportTypeHJM.InfoEmployeeDetail:
                    var info     = new rp_InformationEmployeeDetail();
                    var recordId = int.Parse(Request.QueryString["recordId"]);
                    var record   = RecordController.GetById(recordId);
                    info.BindData(record);
                    return(info);

                //info employee detail 2C - 98
                case ReportTypeHJM.InfoEmployeeDetailV2:
                    var infoDetail = new rp_InformationEmployeeDetail_V2();
                    var recordIdV2 = int.Parse(Request.QueryString["recordId"]);
                    var recordV2   = RecordController.GetById(recordIdV2);
                    infoDetail.BindData(recordV2);
                    return(infoDetail);
                }
            }

            // return report
            return(null);
        }
Ejemplo n.º 2
0
        public DevExpress.XtraReports.UI.XtraReport CreateReport()
        {
            var curriculum = new rp_PrintCurriculumVitae();

            try
            {
                var filter    = new Filter();
                var recordIds = Request.QueryString["ListRecordId"];

                filter.Departments = Request.QueryString["departments"];
                filter.RecordIds   = recordIds;
                curriculum.BindData();
            }
            catch (Exception ex)
            {
                Dialog.ShowError("Có lỗi xảy ra " + ex.Message);
            }
            return(curriculum);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Init report from type
        /// </summary>
        /// <returns></returns>
        private XtraReport InitReport()
        {
            if (Enum.TryParse(Request.QueryString["rp"], true, out ReportTypeHJM rpType))
            {
                // init report
                XtraReport report;
                switch (rpType)
                {
                //Regulation
                case ReportTypeHJM.QuantityDistrictCivilServants:
                    report = new rpHJM_QuantityDistrictCivilServants();
                    break;

                case ReportTypeHJM.QuantityCommuneCivilServants:
                    report = new rpHJM_QuantityCommuneCivilServants();
                    break;

                case ReportTypeHJM.SalaryDistrictCivilServants:
                    report = new rpHJM_SalaryDistrictCivilServants();
                    break;

                case ReportTypeHJM.SalaryCommuneCivilServants:
                    report = new rpHJM_SalaryCommuneCivilServants();
                    break;

                case ReportTypeHJM.QuantityDistrictCivilServantsDetail:
                    report = new rpHJM_QuantityDistrictCivilServantsDetail();
                    break;

                case ReportTypeHJM.QuantityOfEmployee:
                    report = new rpHJM_QuantityOfEmployee();
                    break;

                case ReportTypeHJM.QuantityFemaleEmployee:
                    report = new rpHJM_QuantityFemaleEmployee();
                    break;

                case ReportTypeHJM.QuantityEthnicMinority:
                    report = new rpHJM_QuantityEthnicMinority();
                    break;

                case ReportTypeHJM.QuantityStaff:
                    report = new rpHJM_QuantityStaff();
                    break;

                case ReportTypeHJM.ListEmployeeByPosition:
                    report = new rpHJM_ListEmployeeByPosition();
                    break;

                //Business
                case ReportTypeHJM.EmployeeList:
                    report = new rpHJM_EmployeeList();
                    break;

                case ReportTypeHJM.PartyMember:
                    report = new rpHJM_PartyMember();
                    break;

                case ReportTypeHJM.ContractsOfEmployee:
                    report = new rpHJM_ContractsOfEmployee();
                    break;

                case ReportTypeHJM.EmployeeExpried:
                    report = new rpHJM_EmployeeExpired();
                    break;

                case ReportTypeHJM.EmployeeAssigned:
                    report = new rpHJM_EmployeeAssigned();
                    break;

                case ReportTypeHJM.BornInMonth:
                    report = new rpHJM_BornInMonth();
                    break;

                case ReportTypeHJM.UnionMember:
                    report = new rpHJM_UnionMember();
                    break;

                case ReportTypeHJM.MilitaryList:
                    report = new rpHJM_MilitaryList();
                    break;

                case ReportTypeHJM.EmployeeByDepartment:
                    report = new rpHJM_EmployeeByDepartment();
                    break;

                case ReportTypeHJM.EmployeeMoveTo:
                    report = new rpHJM_EmployeeMoveTo();
                    break;

                case ReportTypeHJM.EmployeeMoveFrom:
                    report = new rpHJM_EmployeeMoveFrom();
                    break;

                case ReportTypeHJM.EmployeeTurnoverTo:
                    report = new rpHJM_EmployeeTurnoverTo();
                    break;

                case ReportTypeHJM.EmployeeTurnoverFrom:
                    report = new rpHJM_EmployeeTurnoverFrom();
                    break;

                case ReportTypeHJM.EmployeeSecondmentTo:
                    report = new rpHJM_EmployeeSecondmentTo();
                    break;

                case ReportTypeHJM.EmployeeSecondmentFrom:
                    report = new rpHJM_EmployeeSecondmentFrom();
                    break;

                case ReportTypeHJM.EmployeePlurality:
                    report = new rpHJM_EmployeePlurality();
                    break;

                case ReportTypeHJM.EmployeeDismissment:
                    report = new rpHJM_EmployeeDismissment();
                    break;

                case ReportTypeHJM.EmployeeTranfer:
                    report = new rpHJM_EmployeeTranfer();
                    break;

                case ReportTypeHJM.EmployeeSeniority:
                    report = new rpHJM_EmployeeSeniority();
                    break;

                case ReportTypeHJM.EmployeeCompensation:
                    report = new rpHJM_EmployeeCompensation();
                    break;

                case ReportTypeHJM.EmployeeRetirement:
                    report = new rpHJM_EmployeeRetirement();
                    break;

                case ReportTypeHJM.EmployeeFostering:
                    report = new rpHJM_EmployeeFostering();
                    break;

                //Salary
                case ReportTypeHJM.SalaryIncrease:
                    report = new rpHJM_SalaryIncrease();
                    break;

                case ReportTypeHJM.SalaryIncreaseProcess:
                    report = new rpHJM_SalaryIncreaseProcess();
                    break;

                case ReportTypeHJM.SalaryOutOfFrame:
                    report = new rpHJM_SalaryOutOfFrame();
                    break;

                //Training - Onsite
                case ReportTypeHJM.EmployeeTraining:
                    report = new rpHJM_EmployeeTraining();
                    break;

                case ReportTypeHJM.EmployeeOnsite:
                    report = new rpHJM_EmployeeOnsite();
                    break;

                //Rewared - Disciplined
                case ReportTypeHJM.EmployeeReceivedAward:
                    report = new rpHJM_EmployeeReceivedAward();
                    break;

                case ReportTypeHJM.EmployeeRewarded:
                    report = new rpHJM_EmployeeRewarded();
                    break;

                case ReportTypeHJM.EmployeeDisciplined:
                    report = new rpHJM_EmployeeDisciplined();
                    break;

                //Curriculum
                case ReportTypeHJM.CurriculumVitae:
                    report = new rp_PrintCurriculumVitae();
                    break;

                default:
                    // invalid report type
                    return(null);
                }
                // return
                return(report);
            }
            // invalid report type
            return(null);
        }