⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bankroll.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.User.Info
{
    using PowerEasy.Accessories;
    using PowerEasy.Common;
    using PowerEasy.Components;
    using PowerEasy.Controls;
    using PowerEasy.Enumerations;
    using PowerEasy.Model.Accessories;
    using PowerEasy.Web.UI;
    using PowerEasy.WebSite.Controls;
    using System;
    using System.Collections;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class Bankroll : DynamicPage
    {
        protected ExtendedGridView EgvBankroll;
        protected HtmlForm form1;
        protected HiddenField HdnUserName;
        private decimal m_CurrentPageIncome;
        private decimal m_CurrentPagePayout;
        protected ObjectDataSource OdsBankroll;
        protected UserNavigation UserCenterNavigation;
        protected ExtendedSiteMapPath YourPosition;

        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");
            }
        }

        protected void EgvBankroll_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                BankrollItemInfo dataItem = e.Row.DataItem as BankrollItemInfo;
                if (dataItem != null)
                {
                    if (dataItem.Status == BankrollItemStatus.Confirm)
                    {
                        if (dataItem.Money > 0M)
                        {
                            this.m_CurrentPageIncome += dataItem.Money;
                        }
                        else
                        {
                            this.m_CurrentPagePayout += Math.Abs(dataItem.Money);
                        }
                    }
                    Label label = e.Row.FindControl("LblRemark") as Label;
                    if (label != null)
                    {
                        dataItem.Remark = DataSecurity.HtmlDecode(dataItem.Remark);
                        label.Text = StringHelper.SubString(dataItem.Remark, 0x2e, "...");
                        label.ToolTip = dataItem.Remark;
                    }
                }
            }
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!base.IsPostBack)
            {
                this.HdnUserName.Value = PEContext.Current.User.UserName;
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -