protected void EgvBill_OnDataBound(object sender, EventArgs e)
 {
     if (this.EgvBill.Rows.Count > 0)
     {
         GridViewRow footerRow = this.EgvBill.FooterRow;
         while (footerRow.Cells.Count != 4)
         {
             footerRow.Cells.RemoveAt(0);
         }
         footerRow.HorizontalAlign     = HorizontalAlign.Right;
         footerRow.Cells[0].ColumnSpan = 2;
         ArrayList totalInComeAndPayOutAll = BankrollItem.GetTotalInComeAndPayOutAll(this.userName);
         double    num  = DataConverter.CDouble(totalInComeAndPayOutAll[0]);
         double    num2 = DataConverter.CDouble(totalInComeAndPayOutAll[1]);
         footerRow.Cells[0].Text = "本页合计:<br/>总计金额:";
         footerRow.Cells[1].Text = this.m_TotalIncome.ToString("0.00") + "<br />" + num.ToString("0.00");
         footerRow.Cells[2].Text = Math.Abs(this.m_TotalPayout).ToString("0.00") + "<br />" + Math.Abs(num2).ToString("0.00");
         footerRow.Cells[3].Text = "<br />资金余额:" + ((num + num2)).ToString("0.00");
         this.m_TotalIncome      = this.m_TotalPayout = 0M;
     }
 }
Beispiel #2
0
 protected void EgdvBankrollItem_DataBound(object sender, EventArgs e)
 {
     if (this.EgdvBankrollItem.Rows.Count > 0)
     {
         GridViewRow footerRow = this.EgdvBankrollItem.FooterRow;
         while (footerRow.Cells.Count != 4)
         {
             footerRow.Cells.RemoveAt(0);
         }
         footerRow.CssClass        = this.EgdvBankrollItem.RowStyle.CssClass;
         footerRow.HorizontalAlign = HorizontalAlign.Right;
         ArrayList totalInComeAndPayOutAll = BankrollItem.GetTotalInComeAndPayOutAll();
         decimal   num  = DataConverter.CDecimal(totalInComeAndPayOutAll[0]);
         decimal   num2 = DataConverter.CDecimal(totalInComeAndPayOutAll[1]);
         footerRow.Cells[0].ColumnSpan = 5;
         footerRow.Cells[3].ColumnSpan = 4;
         footerRow.Cells[0].Text       = "本页合计:<br/>总计金额:";
         footerRow.Cells[1].Text       = this.m_CurrentPageIncome.ToString("N2") + "<br/>" + num.ToString("N2");
         footerRow.Cells[2].Text       = Math.Abs(this.m_CurrentPagePayout).ToString("N2") + "<br/>" + Math.Abs(num2).ToString("N2");
     }
 }
 protected void EgvBankroll_DataBound(object sender, EventArgs e)
 {
     if (this.EgvBankroll.Rows.Count > 0)
     {
         GridViewRow footerRow = this.EgvBankroll.FooterRow;
         footerRow.CssClass = this.EgvBankroll.RowStyle.CssClass;
         while (footerRow.Cells.Count > 4)
         {
             footerRow.Cells.RemoveAt(0);
         }
         ArrayList totalInComeAndPayOutAll = BankrollItem.GetTotalInComeAndPayOutAll(this.HdnUserName.Value);
         decimal   num  = DataConverter.CDecimal(totalInComeAndPayOutAll[0]);
         decimal   num2 = DataConverter.CDecimal(totalInComeAndPayOutAll[1]);
         footerRow.HorizontalAlign          = HorizontalAlign.Right;
         footerRow.Cells[0].ColumnSpan      = 3;
         footerRow.Cells[3].ColumnSpan      = 2;
         footerRow.Cells[0].Text            = "本页合计:<br />总计金额:";
         footerRow.Cells[1].Text            = this.m_CurrentPageIncome.ToString("N2") + "<br />" + num.ToString("N2");
         footerRow.Cells[2].Text            = this.m_CurrentPagePayout.ToString("N2") + "<br />" + Math.Abs(num2).ToString("N2");
         footerRow.Cells[3].HorizontalAlign = HorizontalAlign.Center;
         footerRow.Cells[3].Text            = "&nbsp;<br />资金余额:" + ((num + num2)).ToString("N2");
     }
 }