예제 #1
0
        protected void btnExport_Click(object sender, EventArgs e)
        {
            string sSql2 = "select * from (" + this.sDbTable + ") as m where 1=1" + this.sWhere;

            this.ReportData = DbHelperSQL.ExecuteDataTable(sSql2);

            // Excel Columns
            NameValueCollection ExcelCollection = new NameValueCollection();

            ExcelCollection.Add("Branch", "BranchName");
            ExcelCollection.Add("Name", "FullName");
            ExcelCollection.Add("Progress", "Progress");
            ExcelCollection.Add("Running Total", "RunningTotal");
            ExcelCollection.Add("Low Total", "LowRange");
            ExcelCollection.Add("Medium Total", "MediumRange");
            ExcelCollection.Add("High Range", "HighRange");

            // sheet name
            string sSheetName = "User Production Goals";

            // 显示给用户的Xls文件名
            DateTime dt = DateTime.Now;
            string   sClientXlsFileName = "User_Production_Goals_Report-" + dt.ToString("MM_dd_yy") + ".xls";

            // export and download
            XlsExporter.DownloadXls(this, ReportData, sClientXlsFileName, sSheetName);
        }
예제 #2
0
        protected void btnExport_Click(object sender, EventArgs e)
        {
            int       recordCount = 0;
            DataTable dtReports   = null;
            DataSet   reports     = branchManager.GetBranchGoalsReport(65535, 0, iRegionID.ToString(), iDivisionID.ToString(), iBranchID.ToString(),
                                                                       out recordCount, OrderName, OrderType);

            if (null != reports && reports.Tables.Count > 0)
            {
                dtReports = reports.Tables[0];
            }

            // Excel Columns
            NameValueCollection ExcelCollection = new NameValueCollection();

            ExcelCollection.Add("Branch", "BranchName");
            ExcelCollection.Add("Progress", "Progress");
            ExcelCollection.Add("Running Total", "RunningTotal");
            ExcelCollection.Add("Low Range", "LowRange");
            ExcelCollection.Add("Medium Range", "MediumRange");
            ExcelCollection.Add("High Range", "HighRange");

            // sheet name
            string sSheetName = "Branch Production Goals Report";

            // 显示给用户的Xls文件名
            DateTime dt = DateTime.Now;
            string   sClientXlsFileName = "Branch_Production_Goals_Report-" + dt.ToString("MM_dd_yy") + ".xls";

            // export and download
            XlsExporter.DownloadXls(this, dtReports, sClientXlsFileName, sSheetName);
        }
예제 #3
0
        protected void btnExport_Click(object sender, EventArgs e)
        {
            int       recordCount = 0;
            DataTable dtReports   = null;

            BLL.LoanPointFields bllLPF = new LoanPointFields();

            #region Where
            string whereStr = " 1=1 ";

            if (iRegionID != -1)
            {
                whereStr += " AND RegionID= " + iRegionID.ToString();
            }
            if (iDivision != -1)
            {
                whereStr += " AND DivisionID= " + iDivision.ToString();
            }
            if (iBranch != -1)
            {
                whereStr += " AND BranchId = " + iBranch.ToString();
            }
            whereStr += " ";
            #endregion

            DataSet reports = bllLPF.GetProcessingList(65535, 0, whereStr, out recordCount, OrderName, OrderType, CurrUser.iUserID, CurrUser.bAccessOtherLoans);
            if (null != reports && reports.Tables.Count > 0)
            {
                dtReports = reports.Tables[0];
            }

            // Excel Columns
            NameValueCollection ExcelCollection = new NameValueCollection();
            ExcelCollection.Add("Branch", "Branch");
            ExcelCollection.Add("Borrower Last Name", "LastName");
            ExcelCollection.Add("Borrower First Name", "FirstName");
            ExcelCollection.Add("Lender", "Lender");
            ExcelCollection.Add("Loan Originator", "LoanOriginator");
            ExcelCollection.Add("Loan Amount", "LoanAmount");
            ExcelCollection.Add("Note Rate", "NoteRate");
            ExcelCollection.Add("Status", "Status");
            ExcelCollection.Add("Status Date", "StatusDate");
            ExcelCollection.Add("Loan Processor", "LoanProcessor");
            ExcelCollection.Add("Loan Program", "LoanProgram");
            ExcelCollection.Add("Loan Origination Fee", "LoanOriginationFee");
            ExcelCollection.Add("GFE Date", "GFEDate");
            ExcelCollection.Add("LTV Ratio", "LTVRatio");
            ExcelCollection.Add("Net Adjusted Price", "NetAdjustedPrice");
            ExcelCollection.Add("Lock Date", "LockDate");

            // sheet name
            string sSheetName = "Point Pipeline Report";

            // 显示给用户的Xls文件名
            string sClientXlsFileName = "Point_Pipeline_Report.xls";

            // export and download
            XlsExporter.DownloadXls(this, dtReports, sClientXlsFileName, sSheetName);
        }
예제 #4
0
    protected void btnExport_Click(object sender, EventArgs e)
    {
        BindAlertGrid();

        DataTable dtExport = new DataTable();

        dtExport.Columns.Add("Alert Description");
        dtExport.Columns.Add("Assign User");
        dtExport.Columns.Add("Type");
        dtExport.Columns.Add("Due Date");
        dtExport.Columns.Add("Borrower");
        DataRow drExport;
        string  sSelAlertID = hfSelAlertId.Value.TrimEnd(',');

        DataRow[] drs = dsAlertList.Tables[0].Select("LoanAlertId in (" + sSelAlertID + ")");
        foreach (DataRow dr in drs)
        {
            drExport = dtExport.NewRow();
            drExport["Alert Description"] = dr["Desc"].ToString();
            drExport["Assign User"]       = dr["Username"].ToString();
            drExport["Type"]     = dr["AlertType"].ToString();
            drExport["Due Date"] = dr["DueDate"].ToString() != "" ? Convert.ToDateTime(dr["DueDate"]).ToShortDateString() : dr["DueDate"].ToString();
            drExport["Borrower"] = dr["BorrowerName"].ToString();
            dtExport.Rows.Add(drExport);
        }
        //// Excel Columns
        //NameValueCollection ExcelCollection = new NameValueCollection();
        //ExcelCollection.Add("Alert Description", "Desc");
        //ExcelCollection.Add("Assign User", "Username");
        //ExcelCollection.Add("Type", "AlertType");
        //ExcelCollection.Add("Due Date", "DueDate");
        //ExcelCollection.Add("Borrower", "BorrowerName");

        // sheet name
        string sSheetName = "Alerts";

        // 显示给用户的Xls文件名
        DateTime dt = DateTime.Now;
        string   sClientXlsFileName = "Alerts-" + dt.ToString("MM_dd_yy") + ".xls";

        // export and download
        XlsExporter.DownloadXls(this, dtExport, sClientXlsFileName, sSheetName);
    }
예제 #5
0
 public void SetUp()
 {
     mock                  = Mock_Repository.CreateMock();
     xlsExporter           = new XlsExporter();
     xlsExporter.workSheet = new Worksheet("test");
 }