Exemplo n.º 1
0
    protected void gvTender_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType != DataControlRowType.DataRow)
        {
            if (e.Row.RowType == DataControlRowType.Footer)
            {
                e.Row.Cells[0].Text = "合计";
                DataTable tenderReport = TenderInfo.GetTenderReport(this.txtCode.Text.Trim(), this.txtName.Text.Trim(), this.ddlType.SelectedValue.Trim(), this.txtManager.Value.Trim(), this.txtPrjFollowPeople.Value.Trim(), this.txtPrjPeople.Value.Trim(), this.ddlPrjState.SelectedValue.Trim(), this.txtStartTime.Text.Trim(), this.txtEndTime.Text, this.txtOwnerName.Text.Trim(), this.txtProjPeopleDep.Text, this.dropPrjProperty.SelectedValue, this.txtPrincipal.Value.Trim(), 1, this.AspNetPager1.PageSize * this.AspNetPager1.RecordCount, base.UserCode, this.txtPrjStateChangeTimeStart.Text.Trim(), this.txtPrjStateChangeTimeEnd.Text.Trim());
                e.Row.Cells[8].Text = tenderReport.Compute("SUM(PrjCost)", string.Empty).ToString();
                e.Row.Cells[8].Style.Add("text-align", "right");
                e.Row.Cells[8].CssClass = "decimal_input";
                e.Row.Cells[9].Text     = tenderReport.Compute("SUM(ProfessionalCost)", string.Empty).ToString();
                e.Row.Cells[9].Style.Add("text-align", "right");
                e.Row.Cells[9].CssClass = "decimal_input";
                e.Row.Cells[10].Text    = tenderReport.Compute("SUM(SuccessBidPrice)", string.Empty).ToString();
                e.Row.Cells[10].Style.Add("text-align", "right");
                e.Row.Cells[10].CssClass = "decimal_input";
            }
            return;
        }
        string text = this.gvTender.DataKeys[e.Row.RowIndex]["PrjGuid"].ToString();

        e.Row.Attributes["id"] = text;
        PTPrjInfoStateChange byPrjIdByOrder = new PTPrjInfoStateChangeService().GetByPrjIdByOrder(text);

        if (byPrjIdByOrder != null)
        {
            e.Row.Attributes["changed"] = "1";
            return;
        }
        e.Row.Attributes["changed"] = "0";
    }
Exemplo n.º 2
0
    protected void BindGv()
    {
        int tenderReportCount = TenderInfo.GetTenderReportCount(this.txtCode.Text.Trim(), this.txtName.Text.Trim(), this.ddlType.SelectedValue.Trim(), this.txtManager.Value.Trim(), this.txtPrjFollowPeople.Value.Trim(), this.txtPrjPeople.Value.Trim(), this.ddlPrjState.SelectedValue.Trim(), this.txtStartTime.Text.Trim(), this.txtEndTime.Text, this.txtOwnerName.Text.Trim(), this.txtProjPeopleDep.Text, this.dropPrjProperty.SelectedValue, this.txtPrincipal.Value.Trim(), base.UserCode, this.txtPrjStateChangeTimeStart.Text.Trim(), this.txtPrjStateChangeTimeEnd.Text.Trim());

        this.AspNetPager1.RecordCount = tenderReportCount;
        DataTable tenderReport = TenderInfo.GetTenderReport(this.txtCode.Text.Trim(), this.txtName.Text.Trim(), this.ddlType.SelectedValue.Trim(), this.txtManager.Value.Trim(), this.txtPrjFollowPeople.Value.Trim(), this.txtPrjPeople.Value.Trim(), this.ddlPrjState.SelectedValue.Trim(), this.txtStartTime.Text.Trim(), this.txtEndTime.Text, this.txtOwnerName.Text.Trim(), this.txtProjPeopleDep.Text, this.dropPrjProperty.SelectedValue, this.txtPrincipal.Value.Trim(), this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize, base.UserCode, this.txtPrjStateChangeTimeStart.Text.Trim(), this.txtPrjStateChangeTimeEnd.Text.Trim());

        this.gvTender.DataSource = tenderReport;
        this.gvTender.DataBind();
        this.ComputSum();
    }
Exemplo n.º 3
0
    protected void btnexecl_Click(object sender, System.EventArgs e)
    {
        DataTable tenderReport = TenderInfo.GetTenderReport(this.txtCode.Text.Trim(), this.txtName.Text.Trim(), this.ddlType.SelectedValue.Trim(), this.txtManager.Value.Trim(), this.txtPrjFollowPeople.Value.Trim(), this.txtPrjPeople.Value.Trim(), this.ddlPrjState.SelectedValue.Trim(), this.txtStartTime.Text.Trim(), this.txtEndTime.Text, this.txtOwnerName.Text.Trim(), this.txtProjPeopleDep.Text, this.dropPrjProperty.SelectedValue, this.txtPrincipal.Value.Trim(), 1, 2147483647, base.UserCode, this.txtPrjStateChangeTimeStart.Text.Trim(), this.txtPrjStateChangeTimeEnd.Text.Trim());

        if (tenderReport.Rows.Count > 0)
        {
            DataRow dataRow = tenderReport.NewRow();
            dataRow["ItemName"]         = "合计";
            dataRow["PrjCost"]          = tenderReport.Compute("sum(PrjCost)", "1>0");
            dataRow["ProfessionalCost"] = tenderReport.Compute("sum(ProfessionalCost)", "1>0");
            dataRow["SuccessBidPrice"]  = tenderReport.Compute("sum(SuccessBidPrice)", "1>0");
            tenderReport.Rows.Add(dataRow);
        }
        this.FormatTable(tenderReport);
        string value = this.hfldSummarizingInfo.Value;

        ExcelHelper.ExportFooterExcel(tenderReport, "项目市场状态一览", "项目市场状态一览", "项目市场状态一览.xls", null, null, 1, value, base.Request.Browser.Browser);
    }