Beispiel #1
0
    protected void btnExport_Click(object sender, System.EventArgs e)
    {
        System.Collections.Generic.List <int> prjState = new System.Collections.Generic.List <int>
        {
            1,
            2,
            3,
            4,
            14,
            15,
            16,
            18,
            19
        };
        DataTable allAtGiveUp = TenderInfo.GetAllAtGiveUp(this.txtPrjName.Text, this.txtPrjCode.Text, this.txtOwner.Text, this.dropPrjKindClass.SelectedValue, this.txtStartTime.Text, this.txtEndTime.Text, prjState, null, base.UserCode, this.txtName.Text, false, 4, this.AspNetPager1.CurrentPageIndex, 2147483647);

        string[] headerName = new string[]
        {
            "序号",
            "项目状态",
            "项目跟踪人",
            "项目编号",
            "项目名称",
            "建设单位",
            "项目类型",
            "工程造价",
            "工程工期",
            "立项申请日期"
        };
        string[] fieldName = new string[]
        {
            "",
            "StateText",
            "Person",
            "PrjCode",
            "PrjName",
            "WorkUnitName",
            "PrjTypeName",
            "PrjCost",
            "Duration",
            "InputDate"
        };
        string[] totalField = new string[]
        {
            "PrjCost"
        };
        ExcelHelper.ExportExcel(allAtGiveUp, headerName, fieldName, totalField, "启动项目一览.xls", base.Request.Browser.Browser);
    }
Beispiel #2
0
    protected void bindGv()
    {
        System.Collections.Generic.List <int> prjState = new System.Collections.Generic.List <int>
        {
            1,
            2,
            3,
            4,
            14,
            15,
            16,
            18,
            19
        };
        string text          = this.txtName.Text;
        int    countAtGiveUp = TenderInfo.GetCountAtGiveUp(this.txtPrjName.Text, this.txtPrjCode.Text, this.txtOwner.Text, this.dropPrjKindClass.SelectedValue, this.txtStartTime.Text, this.txtEndTime.Text, prjState, null, base.UserCode, text, 4);

        this.AspNetPager1.RecordCount = countAtGiveUp;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        DataTable allAtGiveUp = TenderInfo.GetAllAtGiveUp(this.txtPrjName.Text, this.txtPrjCode.Text, this.txtOwner.Text, this.dropPrjKindClass.SelectedValue, this.txtStartTime.Text, this.txtEndTime.Text, prjState, null, base.UserCode, text, false, 4, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);

        this.gvDataInfo.DataSource = allAtGiveUp;
        this.gvDataInfo.DataBind();
    }