Ejemplo n.º 1
0
 protected void AspNetPager1_PageChanged(object sender, System.EventArgs e)
 {
     if (this.ViewState["analysis"] != null)
     {
         DataTable dtAll = this.ViewState["analysis"] as DataTable;
         this.rptBudget.DataSource = EReport.GetPageDataTable(dtAll, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
         this.rptBudget.DataBind();
     }
 }
Ejemplo n.º 2
0
    public void BindGv()
    {
        string    safeString   = this.GetSafeString(this.txtclassName.Text.Trim());
        string    safeString2  = this.GetSafeString(this.txtTemplateName.Text.Trim());
        string    safeString3  = this.GetSafeString(this.txtOrganizer.Text.Trim());
        DataTable workFlowList = WorkFlow.GetWorkFlowList(safeString, safeString2, safeString3, this.txtStartTime.Text.Trim(), this.dropWFState.SelectedValue, this.dropBusinessClass.SelectedValue);

        this.AspNetPager1.RecordCount = workFlowList.Rows.Count;
        this.gvWorkFlow.DataSource    = EReport.GetPageDataTable(workFlowList, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.gvWorkFlow.DataBind();
    }
Ejemplo n.º 3
0
    private void bindGv()
    {
        this.ViewState["Cost"] = EReport.GetBudTaskCost(this.txtCode.Text.Trim(), this.txtName.Text.Trim(), base.UserCode, this.hfldIsWBSRelevance.Value);
        DataTable dataTable = this.ViewState["Cost"] as DataTable;

        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        if (dataTable.Rows.Count != 0)
        {
            string[] array = new string[12];
            array[0] = dataTable.Compute("SUM(MonthRealitybud)", string.Empty).ToString();
            array[1] = dataTable.Compute("SUM(Monthbud)", string.Empty).ToString();
            array[2] = dataTable.Compute("SUM(MonthReality)", string.Empty).ToString();
            array[3] = dataTable.Compute("SUM(Monthacc)", string.Empty).ToString();
            array[4] = dataTable.Compute("SUM(MonthChazhi)", string.Empty).ToString();
            if (System.Convert.ToDecimal(array[0]) + System.Convert.ToDecimal(array[1]) != 0m)
            {
                decimal d = System.Convert.ToDecimal(array[4]) / (System.Convert.ToDecimal(array[0]) + System.Convert.ToDecimal(array[1]));
                array[5] = (decimal.Floor(d * 10000m) / 100m).ToString() + "%";
            }
            else
            {
                array[5] = "0.00%";
            }
            array[6]  = dataTable.Compute("SUM(Target)", string.Empty).ToString();
            array[7]  = dataTable.Compute("SUM(IndirBud)", string.Empty).ToString();
            array[8]  = dataTable.Compute("SUM(Reality)", string.Empty).ToString();
            array[9]  = dataTable.Compute("SUM(IndirAcc)", string.Empty).ToString();
            array[10] = dataTable.Compute("SUM(Chazhi)", string.Empty).ToString();
            if (System.Convert.ToDecimal(array[6]) + System.Convert.ToDecimal(array[7]) != 0m)
            {
                decimal d2 = System.Convert.ToDecimal(array[10]) / (System.Convert.ToDecimal(array[6]) + System.Convert.ToDecimal(array[7]));
                array[11] = (decimal.Floor(d2 * 10000m) / 100m).ToString() + "%";
            }
            else
            {
                array[11] = "0.00%";
            }
            this.ViewState["Total"] = array;
        }
        this.gvCost.DataSource   = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.gvCost.DataKeyNames = new string[]
        {
            "PrjGuid"
        };
        this.gvCost.DataBind();
    }
Ejemplo n.º 4
0
    protected void BindRpt()
    {
        string prjCode = this.txtPrjCode.Text.Trim();
        string prjName = this.txtPrjName.Text.Trim();
        string text    = this.txtStartDate.Text;
        string text2   = this.txtEndDate.Text;

        this.ViewState["analysis"] = EReport.GetBudAnalysis(prjCode, prjName, text, text2, base.UserCode, this.hfldIsWBSRelevance.Value);
        DataTable dataTable = this.ViewState["analysis"] as DataTable;

        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        this.rptBudget.DataSource     = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.rptBudget.DataBind();
        if (this.rptBudget.Items.Count == 0)
        {
            base.RegisterScript("$('#rptBudget tr:last-child').remove();");
        }
    }
Ejemplo n.º 5
0
    public void BindRpt()
    {
        string taskCode = this.txtTaskCode.Text.Trim();
        string taskName = this.txtTaskName.Text.Trim();

        this.ViewState["detail"] = EReport.GetBudAnalysisDetail(this.prjId, taskCode, taskName, this.hfldIsWBSRelevance.Value);
        DataTable dataTable = this.ViewState["detail"] as DataTable;

        if (dataTable == null)
        {
            return;
        }
        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        this.rptBudget.DataSource     = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.rptBudget.DataBind();
        if (this.rptBudget.Items.Count == 0)
        {
            base.RegisterScript("$('#rptBudget tr:last-child').remove();");
        }
    }
Ejemplo n.º 6
0
    private void BindGv()
    {
        this.ViewState["Task"] = EReport.GetTaskReport(this.tvBudget.SelectedValue, this.txtCode.Text.Trim(), this.txtName.Text.Trim());
        DataTable dataTable = this.ViewState["Task"] as DataTable;

        if (dataTable != null)
        {
            this.AspNetPager1.RecordCount = dataTable.Rows.Count;
            this.AspNetPager1.PageSize    = NBasePage.pagesize;
            this.gvBudget.DataSource      = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
            this.gvBudget.DataKeyNames    = new string[]
            {
                "TaskId"
            };
            this.gvBudget.DataBind();
            if (dataTable.Rows.Count != 0)
            {
                string[] value = new string[]
                {
                    dataTable.Compute("SUM(TotalBudget)", string.Empty).ToString(),
                    dataTable.Compute("SUM(TotalAcc)", string.Empty).ToString(),
                    dataTable.Compute("SUM(JieChao)", string.Empty).ToString()
                };
                int[] index = new int[]
                {
                    6,
                    7,
                    8
                };
                GridViewUtility.AddTotalRow(this.gvBudget, value, index);
                this.ViewState["Total"] = value;
                return;
            }
        }
        else
        {
            this.gvBudget.DataSource = dataTable;
            this.gvBudget.DataBind();
        }
    }
Ejemplo n.º 7
0
    public void BindGv()
    {
        this.ViewState["Cost"] = EReport.GetTargetCostDetail(this.prjId, this.txtCode.Text.Trim(), this.txtName.Text.Trim());
        DataTable dataTable = this.ViewState["Cost"] as DataTable;

        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        if (dataTable.Rows.Count != 0)
        {
            string[] array = new string[8];
            array[0] = dataTable.Compute("SUM(MonthBud)", string.Empty).ToString();
            array[1] = dataTable.Compute("SUM(MonthAcc)", string.Empty).ToString();
            array[2] = (System.Convert.ToDecimal(array[0]) - System.Convert.ToDecimal(array[1])).ToString();
            if (System.Convert.ToDecimal(array[0]) != 0m)
            {
                decimal d = System.Convert.ToDecimal(array[2]) / System.Convert.ToDecimal(array[0]);
                array[3] = (decimal.Floor(d * 10000m) / 100m).ToString() + "%";
            }
            else
            {
                array[3] = "0.00%";
            }
            array[4] = dataTable.Compute("SUM(Bud)", string.Empty).ToString();
            array[5] = dataTable.Compute("SUM(Acc)", string.Empty).ToString();
            array[6] = (System.Convert.ToDecimal(array[4]) - System.Convert.ToDecimal(array[5])).ToString();
            if (System.Convert.ToDecimal(array[4]) != 0m)
            {
                decimal d2 = System.Convert.ToDecimal(array[6]) / System.Convert.ToDecimal(array[4]);
                array[7] = (decimal.Floor(d2 * 10000m) / 100m).ToString() + "%";
            }
            else
            {
                array[7] = "0.00%";
            }
            this.ViewState["Total"] = array;
            this.gvCost.DataSource  = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
            this.gvCost.DataBind();
        }
    }
Ejemplo n.º 8
0
    public void BindGv()
    {
        this.ViewState["Jixie"] = EReport.GetJixieAnalysis(this.prjId, this.txtName.Text.Trim());
        DataTable dataTable = this.ViewState["Jixie"] as DataTable;

        if (dataTable.Rows.Count != 0)
        {
            string[] array = new string[8];
            array[0] = dataTable.Compute("SUM(MonthTotalBud)", string.Empty).ToString();
            array[1] = dataTable.Compute("SUM(MonthTotalAcc)", string.Empty).ToString();
            array[2] = dataTable.Compute("SUM(MonthChazhi)", string.Empty).ToString();
            if (System.Convert.ToDecimal(array[0]) != 0m)
            {
                array[3] = (System.Convert.ToDecimal(array[2]) / System.Convert.ToDecimal(array[0])).ToString("P2");
            }
            else
            {
                array[3] = "0.00%";
            }
            array[4] = dataTable.Compute("SUM(TotalBud)", string.Empty).ToString();
            array[5] = dataTable.Compute("SUM(TotalAcc)", string.Empty).ToString();
            array[6] = dataTable.Compute("SUM(Chazhi)", string.Empty).ToString();
            if (System.Convert.ToDecimal(array[4]) != 0m)
            {
                array[7] = (System.Convert.ToDecimal(array[6]) / System.Convert.ToDecimal(array[4])).ToString("P2");
            }
            else
            {
                array[7] = "0.00%";
            }
            this.ViewState["Total"] = array;
        }
        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        this.gvCost.DataSource        = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.gvCost.DataBind();
    }
Ejemplo n.º 9
0
    public void BindGv()
    {
        this.ViewState["Jixie"] = EReport.GetJixieChayi(this.prjId, this.txtName.Text.Trim());
        DataTable dataTable = this.ViewState["Jixie"] as DataTable;

        if (dataTable.Rows.Count != 0)
        {
            string[] value = new string[]
            {
                dataTable.Compute("SUM(MonthTotalBud)", string.Empty).ToString(),
                dataTable.Compute("SUM(Monthjiacha)", string.Empty).ToString(),
                dataTable.Compute("SUM(Monthchazhi)", string.Empty).ToString(),
                dataTable.Compute("SUM(TotalBud)", string.Empty).ToString(),
                dataTable.Compute("SUM(QuantityChazhi)", string.Empty).ToString(),
                dataTable.Compute("SUM(Jiacha)", string.Empty).ToString(),
                dataTable.Compute("SUM(Chazhi)", string.Empty).ToString()
            };
            this.ViewState["Total"] = value;
        }
        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        this.gvCost.DataSource        = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.gvCost.DataBind();
    }
Ejemplo n.º 10
0
    public void BindRpt()
    {
        string    cbsCode = this.txtTaskCode.Text.Trim();
        string    cbsName = this.txtTaskName.Text.Trim();
        DataTable dataTable;

        if (this.year == "zzjg")
        {
            dataTable = EReport.GetOrganizationCosts(this.prjId, cbsCode, cbsName);
        }
        else
        {
            dataTable = EReport.GetIndirectCosts(this.prjId, cbsCode, cbsName);
        }
        this.ViewState["costs"]       = dataTable;
        this.AspNetPager1.RecordCount = dataTable.Rows.Count;
        this.AspNetPager1.PageSize    = NBasePage.pagesize;
        this.rptBudget.DataSource     = EReport.GetPageDataTable(dataTable, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.rptBudget.DataBind();
        if (this.rptBudget.Items.Count == 0)
        {
            base.RegisterScript("$('#rptBudget tr:last-child').remove();");
        }
    }