Example #1
0
    protected override void OnPreRender(EventArgs e)
    {
        GridView[] arr1 = new GridView[] { this.GridView1, this.GridView2 };
        Label      lab1 = null;
        Label      lab2 = null;
        Label      lab3 = null;

        String    zcid  = null;
        String    zcbid = null;
        ArrayList list1 = new ArrayList();
        ArrayList list2 = new ArrayList();
        ZcspBU    bu1   = new ZcspBU();

        for (int i = 0; i < arr1.Length; i++)
        {
            double d1 = 0;
            double d2 = 0;
            double d0 = 0;

            foreach (GridViewRow row in arr1[i].Rows)
            {
                lab1 = row.FindControl("zcid") as Label;
                if (lab1 != null)
                {
                    zcid = lab1.Text.Trim();
                }

                lab1 = row.FindControl("zcbid") as Label;
                if (lab1 != null)
                {
                    zcbid = lab1.Text.Trim();
                }

                lab2 = row.FindControl("huikuan") as Label;
                lab3 = row.FindControl("zhichu") as Label;
                if (lab2 != null && lab3 != null)
                {
                    if (String.IsNullOrEmpty(zcid) == false)
                    {
                        if (list1.Contains(zcid) == false)
                        {
                            list1.Add(zcid);
                            d0        = bu1.GetHuiKuan(zcid, ZCKind.单条资产);
                            d1        = d1 + d0;
                            lab2.Text = d0.ToString("n");

                            d0        = bu1.GetZhiChu(zcid, ZCKind.单条资产);
                            d2        = d2 + d0;
                            lab3.Text = d0.ToString("n");
                        }
                        else
                        {
                            lab2.Text = "-";
                            lab3.Text = "-";
                        }
                    }
                    else
                    {
                        if (String.IsNullOrEmpty(zcbid) == false)
                        {
                            if (list2.Contains(zcbid) == false)
                            {
                                list2.Add(zcbid);
                                d0        = bu1.GetHuiKuan(zcbid, ZCKind.资产包);
                                d1        = d1 + d0;
                                lab2.Text = d0.ToString("n");

                                d0        = bu1.GetZhiChu(zcbid, ZCKind.资产包);
                                d2        = d2 + d0;
                                lab3.Text = d0.ToString("n");
                            }
                            else
                            {
                                lab2.Text = "-";
                                lab3.Text = "-";
                            }
                        }
                        else
                        {
                            lab2.Text = d1.ToString("n");
                            lab3.Text = d2.ToString("n");
                        }
                    }
                }
            }
        }

        base.OnPreRender(e);
    }
Example #2
0
    //计算回款和支持
    protected override void OnPreRender(EventArgs e)
    {
        Label lab1 = null;
        Label lab2 = null;
        Label lab3 = null;

        String    zcid  = null;
        String    zcbid = null;
        ArrayList list1 = new ArrayList();
        ArrayList list2 = new ArrayList();
        ZcspBU    bu1   = new ZcspBU();

        double d1 = 0;
        double d2 = 0;
        double d0 = 0;

        foreach (GridViewRow row in this.GridView1.Rows)
        {
            lab1 = row.FindControl("zcid") as Label;
            if (lab1 != null)
            {
                zcid = lab1.Text.Trim();
            }

            lab1 = row.FindControl("zcbid") as Label;
            if (lab1 != null)
            {
                zcbid = lab1.Text.Trim();
            }

            lab2 = row.FindControl("huikuan") as Label;
            lab3 = row.FindControl("zhichu") as Label;
            if (lab2 != null && lab3 != null)
            {
                if (String.IsNullOrEmpty(zcid) == false)
                {
                    d0        = bu1.GetHuiKuan(zcid, ZCKind.单条资产);
                    d1        = d1 + d0;
                    lab2.Text = d0.ToString("n");

                    d0        = bu1.GetZhiChu(zcid, ZCKind.单条资产);
                    d2        = d2 + d0;
                    lab3.Text = d0.ToString("n");
                }
                else
                {
                    if (String.IsNullOrEmpty(zcbid) == false)
                    {
                        d0        = bu1.GetHuiKuan(zcbid, ZCKind.资产包);
                        d1        = d1 + d0;
                        lab2.Text = d0.ToString("n");

                        d0        = bu1.GetZhiChu(zcbid, ZCKind.资产包);
                        d2        = d2 + d0;
                        lab3.Text = d0.ToString("n");
                    }
                    else
                    {
                        lab2.Text = d1.ToString("n");
                        lab3.Text = d2.ToString("n");
                    }
                }
            }
        }
    }
Example #3
0
    //计算回款和支持
    protected override void OnPreRender(EventArgs e)
    {
        if (!Page.IsPostBack)
        {
            // this.BindData(null,null);
            // this.AdvanceSearch1.SetDepartRow(false);
            // this.NewBindData();

            this.SearchControl1.GetSearchCondition();
            this.NewBindData();
        }

        Label lab1 = null;
        Label lab2 = null;
        Label lab3 = null;

        String    zcid  = null;
        String    zcbid = null;
        ArrayList list1 = new ArrayList();
        ArrayList list2 = new ArrayList();
        ZcspBU    bu1   = new ZcspBU();

        double d1 = 0;
        double d2 = 0;
        double d0 = 0;

        foreach (GridViewRow row in this.GridView1.Rows)
        {
            lab1 = row.FindControl("zcid") as Label;
            if (lab1 != null)
            {
                zcid = lab1.Text.Trim();
            }

            lab1 = row.FindControl("zcbid") as Label;
            if (lab1 != null)
            {
                zcbid = lab1.Text.Trim();
            }

            lab2 = row.FindControl("huikuan") as Label;
            lab3 = row.FindControl("zhichu") as Label;
            if (lab2 != null && lab3 != null)
            {
                if (String.IsNullOrEmpty(zcid) == false)
                {
                    d0        = bu1.GetHuiKuan(zcid, ZCKind.单条资产);
                    d1        = d1 + d0;
                    lab2.Text = d0.ToString("n");

                    d0        = bu1.GetZhiChu(zcid, ZCKind.单条资产);
                    d2        = d2 + d0;
                    lab3.Text = d0.ToString("n");
                }
                else
                {
                    if (String.IsNullOrEmpty(zcbid) == false)
                    {
                        d0        = bu1.GetHuiKuan(zcbid, ZCKind.资产包);
                        d1        = d1 + d0;
                        lab2.Text = d0.ToString("n");

                        d0        = bu1.GetZhiChu(zcbid, ZCKind.资产包);
                        d2        = d2 + d0;
                        lab3.Text = d0.ToString("n");
                    }
                    else
                    {
                        lab2.Text = d1.ToString("n");
                        lab3.Text = d2.ToString("n");
                    }
                }
            }
        }
    }