Exemple #1
0
        public void ExportErrorList()
        {
            DataTable mydata = CommonHelper.GetImportErrorFile <T_CMS_Master_Contract>(CurrentUser, "T_CMS_Master_Contract");

            string[] RemoveColumn = { "CompanyID",                   "TargetDisplayID",             "ReturnDisplay",            "TotalRecord",
                                      "CreatedUser",                 "CreatedDate",                 "StatusID",                 "ApproverLevel",   "ContractLevel",        "SalutationID", "PositionID",   "LocationID",
                                      "PassportNo",                  "PassportDOI",                 "PassportPOI",              "LabourBookNo",    "LabourDOI",
                                      "LabourPOI",                   "AnnualLeave",                 "EmpTypeID",
                                      "EmpSubTypeID",                "WorkPermitNo",                "WorkPermitFrom",           "WorkPermitTo",
                                      "HomeGrossOffer",              "HomeGrossOfferEffectiveFrom",
                                      "HomeGrossOfferEffectiveTo",   "RelocationallowanceCurrency", "Relocationallowance",
                                      "GoabroadallowanceCurrency",   "Goabroadallowance",           "WaivingallowanceCurrency", "Waivingallowance","HostCountryCurrency",
                                      "HostGrossOfferEffectiveFrom", "HostGrossOfferEffectiveTo",   "Remarks",                  "CreatedBy",       "ModifiedBy",
                                      "ModifiedDate",                "IsActive",                    "OriginalDate",             "WorkFlowStatus",  "HandPhone",            "WorkHoursID",  "ContractTerm", "ProbationsPeriod","IDPOI","Fullname",
                                      "EmployeeCode",                "ContractNo",                  "EmployeeNO",               "EmployeeInfo",    "DirectCode",           "INDirectCode",

                                      //"FirstName_EN","MiddleName_EN","LastName_EN","ContractNo","EmployeeCode",
                                      "GradeID",                     "CMSOrg",                      "Mode",                     "DeptID",          "ErrorMesssage" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (mydata.Columns.Contains(RemoveColumn[i]))
                {
                    mydata.Columns.Remove(RemoveColumn[i]);
                }
            }
            FileInputHelper.ExportExcel(mydata, "Contract_Error_List", "Contract_Error_List", false);
        }
        public string ExportExMonthTMS(int UserID, string MonthID, string FilterBy, string FilterValue)
        {
            External_TimesCollection collection = T_LMS_Trans_LeaveStoryManager.GetExMonthlyReport(UserID, MonthID, FilterBy, FilterValue);
            DataSet   ds       = new DataSet();
            DataTable dt       = collection.ToDataTable <External_Times>();
            string    fileName = UserID + "_Monthly_TimeSheet_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] sheetName    = { "Daily_TMS" };
            string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate", "ErrorMesssage" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }
            ds.Tables.Add(dt);
            //set Column Date Format
            //int[] DateColumn = { 5, 6 };
            //ExcelPara mypara = new ExcelPara()
            //{
            //    ds = ds,
            //    sheetName = sheetName,
            //    fileName = fileName,
            //    DateColumns = DateColumn,
            //    DateFormat = "h:mm:ss tt"
            //};
            //FileInputHelper.ExportMultiSheetExcelExtend(mypara);
            FileInputHelper.ExportExcel(dt, fileName, "Monthly_TimeSheet", false);
            return(fileName);
        }
        /// <summary>
        /// ExportExcel File
        /// </summary>
        /// <returns></returns>
        public string ExportExcel(string searchprm = "")
        {
            RBVHSearchFilter SearchKey = BindSearchHRDB(searchprm);


            RBVHEmployeeCollection collection = RBVHEmployeeManager.Search(SearchKey);

            DataTable dt       = collection.ToDataTable <RBVHEmployee>();
            string    fileName = "RBVHEmployee_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");
            //string[] RemoveColumn = { "CompanyID" , "TargetDisplayID", "ReturnDisplay","TotalRecord", "CreatedUser","CreatedDate"};
            //for (int i = 0; i < RemoveColumn.Length; i++)
            //{
            //    if (dt.Columns.Contains(RemoveColumn[i]))
            //    {
            //        dt.Columns.Remove(RemoveColumn[i]);
            //    }
            //}
            HeaderItemCollection RemoveColumn = CommonHelper.HideColumn <RBVHEmployee>(CurrentUser, "RBVHEmployee");

            for (int i = 0; i < RemoveColumn.Count; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i].name))
                {
                    dt.Columns.Remove(RemoveColumn[i].name);
                }
            }

            FileInputHelper.ExportExcel(dt, fileName, "RBVHEmployee List", false);
            return(fileName);
        }
Exemple #4
0
        public void TMSEmployeeExportExcel(string searchprm, int PageSize)
        {
            EMPTMSPara ObjPara = JsonConvert.DeserializeObject <EMPTMSPara>(searchprm,
                                                                            new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore,
                DateFormatString  = "dd/MM/yyyy"
            });

            ObjPara.OrderBy        = "EmployeeNo";
            ObjPara.OrderDirection = "Desc";
            ObjPara.Page           = 1;
            ObjPara.PageSize       = PageSize;
            DataTable dt = new DataTable();

            dt = ReportManager.EmployeeTMSSummaryReport(ObjPara);
            string fileName = "TMS_Employee_Summary_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }
            List <ExcelCellModel> listd = new List <ExcelCellModel>();

            ExcelCellModel ex          = new ExcelCellModel();
            DateTime       mytime      = ObjPara.FromDate.Value;
            List <int>     columnIndex = new List <int>();
            int            b           = 9;

            for (DateTime day = ObjPara.FromDate.Value; day < ObjPara.ToDate.Value; day = day.AddDays(1.0))
            {
                if (BDatetime.isWeekDay(day))
                {
                    columnIndex.Add(b);
                }
                b = b + 1;
            }

            ex.BackgroundColorInfo.ColunmIndex     = columnIndex;
            ex.BackgroundColorInfo.BackgorundColor = XLColor.FromHtml("#FFFFCC");
            ex.BackgroundColorInfo.FontColor       = XLColor.Black;
            //ex. = XLColor.Black;// CellValue(0,PageSize)

            listd.Add(ex);
            FileInputHelper.ExportExcel(dt, fileName, "TMS Employee Summary", true, listd);
            //  return fileName;
        }
        /// <summary>
        /// ExportExcel File
        /// </summary>
        /// <returns></returns>
        public string ExportExcel()
        {
            T_COM_Master_PlaceOfIssueCollection collection = T_COM_Master_PlaceOfIssueManager.GetAll();
            DataTable dt       = collection.ToDataTable <T_COM_Master_PlaceOfIssue>();
            string    fileName = "T_COM_Master_PlaceOfIssue_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }
            FileInputHelper.ExportExcel(dt, fileName, "T_COM_Master_PlaceOfIssue List", false);
            return(fileName);
        }
Exemple #6
0
        /// <summary>
        /// ExportExcel File
        /// </summary>
        /// <returns></returns>
        public string ExportExcel()
        {
            ls_PayrollDOWS_RBVHCollection collection = ls_PayrollDOWS_RBVHManager.GetAll(CurrentUser.EntityID);
            DataTable dt       = collection.ToDataTable <ls_PayrollDOWS_RBVH>();
            string    fileName = "ls_PayrollDOWS_RBVH_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }
            FileInputHelper.ExportExcel(dt, fileName, "ls_PayrollDOWS_RBVH List", false);
            return(fileName);
        }
        /// <summary>
        /// ExportExcel File
        /// </summary>
        /// <returns></returns>
        public string ExportExcel()
        {
            T_CMS_Master_InternshipCollection collection = T_CMS_Master_InternshipManager.GetAll();
            DataTable dt       = collection.ToDataTable <T_CMS_Master_Internship>();
            string    fileName = "T_CMS_Master_Internship_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] RemoveColumn = { "CompanyID",     "ID",          "InternNo", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate",  "EmployeeCode", "SalutationID", "ProbationsPeriodCD", "FullName",     "StatusID",
                                      "ApproverLevel", "InternLevel", "IDCardNo", "PassportNo",      "DeptID",        "LocationID",  "EmpTypeID",   "EmpSubTypeID", "IsActive",     "CreatedBy",    "ModifiedBy",         "ModifiedDate", "ErrorMesssage","Dept","WorkHours", "UniversityID" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }
            FileInputHelper.ExportExcel(dt, fileName, "T_CMS_Master_Internship List", false);
            return(fileName);
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="UserID">Manager/DirectManagerID</param>
        /// <param name="FD">FromDate</param>
        /// <param name="TD">ToDate</param>
        /// <param name="AID">Associate ID</param>
        /// <returns></returns>
        public string ExportExDailyTMS(int UserID, string FD, string TD, int AID)
        {
            DataSet ds = new DataSet();
            ExternalDailyCollection collection = T_LMS_Trans_LeaveStoryManager.ExportExDailyTMS(UserID, FD, TD, AID);
            DataTable dt       = collection.ToDataTable <ExternalDaily>();
            string    fileName = AID + "_Monthly_TimeSheet_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate", "ErrorMesssage" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }

            if (collection.Count > 0)
            {
                ds.Tables.Add(dt);
                int[]     DateColumn = { 6, 7 };
                string[]  sheetName  = { "Daily_TMS" };
                ExcelPara mypara     = new ExcelPara()
                {
                    ds          = ds,
                    sheetName   = sheetName,
                    fileName    = fileName,
                    DateColumns = DateColumn,
                    DateFormat  = "h:mm:ss"
                };
                FileInputHelper.ExportMultiSheetExcelExtend(mypara);
            }
            else
            {
                FileInputHelper.ExportExcel(dt, fileName, "Monthly_TimeSheet", false);
            }
            //set Column Date Format

            //
            return(fileName);
        }
Exemple #9
0
        public string ExportExcel()
        {
            MissCanTimePara b = new MissCanTimePara()
            {
                StartDate = DateTime.Now.AddDays(-31),

                EndDate      = DateTime.Now,
                EmployeeCode = 0
            };
            MissingScanTimeCollection collection = ReportManager.GetExMonthlyReport(b);
            DataTable dt       = collection.ToDataTable <MissingScanTime>();
            string    fileName = "RBVHEmployee_" + SystemConfig.CurrentDate.ToString("MM-dd-yyyy");

            string[] RemoveColumn = { "CompanyID", "TargetDisplayID", "ReturnDisplay", "TotalRecord", "CreatedUser", "CreatedDate" };
            for (int i = 0; i < RemoveColumn.Length; i++)
            {
                if (dt.Columns.Contains(RemoveColumn[i]))
                {
                    dt.Columns.Remove(RemoveColumn[i]);
                }
            }
            DataSet ds = new DataSet();

            ds.Tables.Add(dt);
            //set Column Date Format
            int[]     DateColumn = { 8, 9, 10, 11 };
            string[]  sheetName  = { "Daily_TMS" };
            ExcelPara mypara     = new ExcelPara()
            {
                ds          = ds,
                sheetName   = sheetName,
                fileName    = fileName,
                DateColumns = DateColumn,
                DateFormat  = "h:mm:ss"
            };

            FileInputHelper.ExportMultiSheetExcelExtend(mypara);
            FileInputHelper.ExportExcel(dt, fileName, "RBVHEmployee List", false);
            return(fileName);
        }
Exemple #10
0
        public void ContractPendingReport(string searchprm)
        {
            ContractSearchpara ObjPara = JsonConvert.DeserializeObject <ContractSearchpara>(searchprm,
                                                                                            new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore
            });
            DataTable dt = new DataTable();

            try
            {
                bool isActive = false;
                if (ObjPara.IsActive != null && ObjPara.IsActive.ToLower() == "on")
                {
                    isActive = true;
                }
                dt = T_CMS_Master_ContractManager.CMS_ContractPendingReport(int.Parse(ObjPara.EntityId), null, isActive);
            }
            catch
            {
            }
            FileInputHelper.ExportExcel(dt, "Contract_Pending_" + SystemConfig.CurrentDate.ToShortDateString(), "Contract Pending List", false);
        }
        public void HeadCount(int EntityID, DateTime ExeDate)
        {
            DataTable dt = RBVHEmployeeManager.GetRealTimeEmployeeList(EntityID, ExeDate);

            FileInputHelper.ExportExcel(dt, "Employee List ", "RBVHEmployee List", false);
        }