Example #1
0
        private void BindExpensesListDataGrid(List <QueryElement> list)
        {
            ExpensesCollection coll = ExpensesMethods.GetExpensesList(list);

            this.ExpensesListDataGrid.DataSource = coll;
            this.ExpensesListDataGrid.DataBind();
            for (int i = 0; i < coll.Count; i++)
            {
                ExpensesInfo expenses = coll[i];
                CardInfo     cardInfo = CardMethods.GetCardByCardNumber(expenses.CardNumber, expenses.OwnerId);
                string       bank     = StaticRescourse.DisplayBank(cardInfo.BankId);
                this.ExpensesListDataGrid.Items[i].Cells[4].Text = StaticRescourse.DisplaySpendType(expenses.SpendType);
                this.ExpensesListDataGrid.Items[i].Cells[6].Text = expenses.SpendDate.ToString("yyyy-MM-dd");
                this.ExpensesListDataGrid.Items[i].Cells[7].Text = StaticRescourse.DisplaySpendMode(expenses.SpendMode);
            }
        }
Example #2
0
        private void BindIncomeListDataGrid(List <QueryElement> list)
        {
            CashIncomeCollection coll = CashIncomeMethods.GetCashIncome(list);

            this.IncomeListDataGrid.DataSource = coll;
            this.IncomeListDataGrid.DataBind();
            for (int i = 0; i < coll.Count; i++)
            {
                CashIncomeInfo cashInfo = coll[i];
                CardInfo       cardInfo = CardMethods.GetCardByCardNumber(cashInfo.CardNumber, cashInfo.OwnerId);
                string         bank     = StaticRescourse.DisplayBank(cardInfo.BankId);
                this.IncomeListDataGrid.Items[i].Cells[1].Text = StaticRescourse.DisplayIncomeStatus(cashInfo.Status);
                this.IncomeListDataGrid.Items[i].Cells[4].Text = StaticRescourse.DisplayIncomeType(cashInfo.IncomeType);
                this.IncomeListDataGrid.Items[i].Cells[6].Text = StaticRescourse.DisplayMode(cashInfo.Mode);
                this.IncomeListDataGrid.Items[i].Cells[7].Text = StaticRescourse.DisplayRate(cashInfo.Rate);
                this.IncomeListDataGrid.Items[i].Cells[8].Text = cashInfo.DepositDate.ToString("yyyy-MM-dd");
                if (cashInfo.AutoSave == 1)
                {
                    this.IncomeListDataGrid.Items[i].Cells[12].Text = "是";
                }
                else
                {
                    this.IncomeListDataGrid.Items[i].Cells[12].Text = "否";
                }
                if (HelperCommon.CompareAccordToRequired(cashInfo.BDate))
                {
                    this.IncomeListDataGrid.Items[i].Cells[9].Text = cashInfo.BDate.ToString("yyyy-MM-dd");
                }
                else
                {
                    this.IncomeListDataGrid.Items[i].Cells[9].Text = string.Empty;
                }
                if (HelperCommon.CompareAccordToRequired(cashInfo.EDate))
                {
                    this.IncomeListDataGrid.Items[i].Cells[10].Text = cashInfo.EDate.ToString("yyyy-MM-dd");
                }
                else
                {
                    this.IncomeListDataGrid.Items[i].Cells[10].Text = string.Empty;
                }

                this.IncomeListDataGrid.Items[i].Cells[13].Text = StaticRescourse.DisplayIncomeDepositMode(cashInfo.DepositMode);
            }
        }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (!string.IsNullOrEmpty(Request.QueryString["CardNumber"]))
         {
             this.labTitle.Text                  = "卡信息维护--编辑";
             this.txtAddCardNumber.Enabled       = false;
             this.dropAddCardOwner.Enabled       = false;
             this.dropAddBank.Enabled            = false;
             this.dropCardAddAccountType.Enabled = false;
             this.txtAddCardOpenDate.Enabled     = false;
             this.dropAddCardUser.Focus();
             CardInfo cardInfo = CardMethods.GetCardByCardNumber(Request.QueryString["CardNumber"]);
             InitializeEdit(cardInfo);
         }
         else
         {
             this.labTitle.Text = "卡信息维护--新增";
             this.txtAddCardNumber.Focus();
             Initialize();
         }
     }
 }