Exemplo n.º 1
0
        /// <summary>
        /// ExportExcel File
        /// </summary>
        /// <returns></returns>
        public string ExportExcel()
        {
            T_LMS_Master_AnnualLeaveCollection collection = T_LMS_Master_AnnualLeaveManager.GetAll();
            DataTable dt       = collection.ToDataTable <T_LMS_Master_AnnualLeave>();
            string    fileName = "T_LMS_Master_AnnualLeave_" + 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_LMS_Master_AnnualLeave List", false);
            return(fileName);
        }