Esempio n. 1
0
    protected void bindGv()
    {
        System.Collections.Generic.List <int> prjState = new System.Collections.Generic.List <int>
        {
            1,
            2
        };
        System.Collections.Generic.List <int> flowState = new System.Collections.Generic.List <int>();
        if (this.dropWFState.SelectedValue != "")
        {
            flowState = new System.Collections.Generic.List <int>
            {
                int.Parse(this.dropWFState.SelectedValue)
            };
        }
        string text         = this.txtName.Text;
        int    tendersCount = TenderInfo.GetTendersCount(this.txtPrjCode.Text.Trim(), this.txtPrjName.Text.Trim(), this.txtName.Text.Trim(), this.txtProjPeopleDep.Text.Trim(), this.dropPrjKindClass.SelectedValue, this.txtStartTime.Text.Trim(), this.txtEndTime.Text.Trim(), this.txtOwner.Text.Trim(), this.dropWFState.SelectedValue, this.dropPrjProperty.SelectedValue, base.UserCode);

        this.AspNetPager1.RecordCount = tendersCount;
        DataTable tenders = TenderInfo.GetTenders(this.txtPrjCode.Text.Trim(), this.txtPrjName.Text.Trim(), this.txtName.Text.Trim(), this.txtProjPeopleDep.Text.Trim(), this.dropPrjKindClass.SelectedValue, this.txtStartTime.Text.Trim(), this.txtEndTime.Text.Trim(), this.txtOwner.Text.Trim(), this.dropWFState.SelectedValue, this.dropPrjProperty.SelectedValue, base.UserCode, this.AspNetPager1.PageSize, this.AspNetPager1.CurrentPageIndex);

        this.gvDataInfo.DataSource = tenders;
        this.gvDataInfo.DataBind();
        int       num  = 0;
        int       num2 = 0;
        int       num3 = 0;
        int       num4 = 0;
        DataTable flowStateSummarizingInfo = TenderInfo.GetFlowStateSummarizingInfo(this.txtPrjName.Text, this.txtPrjCode.Text, this.txtOwner.Text, this.dropPrjKindClass.SelectedValue, this.txtStartTime.Text, this.txtEndTime.Text, prjState, flowState, base.UserCode, text, "", "");

        if (flowStateSummarizingInfo != null && flowStateSummarizingInfo.Rows.Count > 0)
        {
            DataRow dataRow = flowStateSummarizingInfo.Rows[0];
            num  = DBHelper.GetInt(dataRow["100"]);
            num += DBHelper.GetInt(dataRow["-1"]);
            num += DBHelper.GetInt(dataRow["0"]);
            num2 = DBHelper.GetInt(dataRow["1"]);
            num3 = DBHelper.GetInt(dataRow["-2"]);
            num4 = DBHelper.GetInt(dataRow["-3"]);
        }
        string text2 = "<span style='margin-left:3px;margin-right:3px;'>";
        string text3 = "</span>";

        this.lblTotal.Text = string.Concat(new object[]
        {
            "汇总:正在申请",
            text2,
            num,
            text3,
            "项,已批准(立项)",
            text2,
            num2,
            text3,
            "项,已驳回",
            text2,
            num3,
            text3,
            "项,重报",
            text2,
            num4,
            text3,
            "项"
        });
    }