Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!this.Page.IsPostBack)
     {
         BankrollItemInfo bankrollItemById = BankrollItem.GetBankrollItemById(BasePage.RequestInt32("BankrollItemID"));
         if (!bankrollItemById.IsNull)
         {
             this.LblDateAndTime.Text  = bankrollItemById.DateAndTime.ToString();
             this.LblClientName.Text   = Client.GetClientNameById(bankrollItemById.ClientId);
             this.LblUserName.Text     = bankrollItemById.UserName;
             this.LblMoneyType.Text    = BankrollItem.GetMoneyType(bankrollItemById.MoneyType);
             this.LblCurrencyType.Text = BankrollItem.GetCurrencyType(bankrollItemById.CurrencyType);
             if (bankrollItemById.Money > 0M)
             {
                 this.LblIncomeMoney.Text = bankrollItemById.Money.ToString("N2");
             }
             else if (bankrollItemById.Money < 0M)
             {
                 this.LblPaymentMoney.Text = Math.Abs(bankrollItemById.Money).ToString("N2");
             }
             if (bankrollItemById.MoneyType == 3)
             {
                 this.LblBank.Text = PayPlatform.GetPayPlatformById(bankrollItemById.EBankId).PayPlatformName;
             }
             else
             {
                 this.LblBank.Text = bankrollItemById.Bank;
             }
             if (bankrollItemById.Status == BankrollItemStatus.NoConfirm)
             {
                 this.LblStatus.Text     = "未确认";
                 this.BtnConfirm.Visible = true;
                 this.BtnDelete.Visible  = true;
             }
             else
             {
                 this.LblStatus.Text = "已确认";
             }
             this.LblIP.Text      = bankrollItemById.IP;
             this.LblInputer.Text = bankrollItemById.Inputer;
             this.LblLogTime.Text = bankrollItemById.LogTime.ToString();
             this.LblRemark.Text  = bankrollItemById.Remark;
             this.LblMemo.Text    = bankrollItemById.Memo;
         }
         else
         {
             AdminPage.WriteErrMsg("<li>未找到对应的资金明细记录</li>");
         }
     }
 }
 protected void EgvBankroll_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     if (e.Row.RowType == DataControlRowType.DataRow)
     {
         BankrollItemInfo dataItem = e.Row.DataItem as BankrollItemInfo;
         if (this.ShowOptions == 1)
         {
             HyperLink link = (HyperLink)e.Row.FindControl("LnkUserName");
             link.NavigateUrl = string.Empty;
         }
         e.Row.Cells[3].Text = BankrollItem.GetMoneyType(dataItem.MoneyType);
         e.Row.Cells[4].Text = BankrollItem.GetCurrencyType(dataItem.CurrencyType);
         e.Row.Cells[6].Text = (dataItem.Money > 0M) ? "收入" : "支出";
         this.m_TotalPayout += dataItem.Money;
     }
 }
 protected string GetMoneyType(object type)
 {
     return(BankrollItem.GetMoneyType(type));
 }