private void lookUpEditCollectionAccount_EditValueChanged(object sender, EventArgs e) { string collectionAccount = ""; if (this.lookUpEditCollectionAccount.EditValue != null) { collectionAccount = this.lookUpEditCollectionAccount.EditValue.ToString(); } IList <Model.AtBillsIncome> billList = billIncomeManager.SelectAtBillsIncomeByBillsOften("0", collectionAccount); bList = new List <Model.AtBillsIncome>(); if (billList != null) { foreach (Model.AtBillsIncome i in billList) { Model.AtBankAccount at = bankAccountManager.Get(i.CollectionAccount); Model.Customer cu = new BL.CustomerManager().Get(i.PassingObject); if (at != null) { i.C = at.BankAccountName; } if (cu != null) { i.A = cu.ToString(); } bList.Add(i); } } this.bindingSourcestringbillsOften.DataSource = billList; }
private void Binds() { IList <Model.AtBillsIncome> billList = billIncomeManager.SelectDuiXianByDate(this.dateEdit1.DateTime, this.dateEdit2.DateTime, this.dateEditDaoQi1.EditValue == null ? global::Helper.DateTimeParse.NullDate : this.dateEditDaoQi1.DateTime, this.dateEditDaoQi2.EditValue == null ? global::Helper.DateTimeParse.EndDate : this.dateEditDaoQi2.DateTime, "1", this.comboBoxProduceType.SelectedIndex.ToString()); bList = new List <Model.AtBillsIncome>(); if (billList != null) { foreach (Model.AtBillsIncome i in billList) { //if (i.BillsOften == "托收中" || i.BillsOften == "票貼中" || i.BillsOften == "尚未兌現") { // Model.AtBankAccount at = bankAccountManager.Get(i.CollectionAccount); if (this.comboBoxProduceType.SelectedIndex == 0) { Model.Customer cu = new BL.CustomerManager().Get(i.PassingObject); i.B = cu.ToString(); } else { Model.Supplier su = new BL.SupplierManager().Get(i.PassingObject); // i.A = cu.Id; i.B = su.ToString(); } //if (at != null) //{ // i.C = at.BankAccountName; //} bList.Add(i); } } } this.bindingSourcestringbillsOften.DataSource = bList; }
public BillCollectionForm() { InitializeComponent(); IList <Model.AtBillsIncome> billList = billIncomeManager.SelectAtBillsIncomeByBillsOften("0", null); bList = new List <Model.AtBillsIncome>(); if (billList != null) { foreach (Model.AtBillsIncome i in billList) { Model.AtBankAccount at = bankAccountManager.Get(i.CollectionAccount); Model.Customer cu = new BL.CustomerManager().Get(i.PassingObject); if (at != null) { i.C = at.BankAccountName; } if (cu != null) { i.A = cu.ToString(); } bList.Add(i); } } this.bindingSourcestringbillsOften.DataSource = billList; //this.bindingSourceAtBankAccount.DataSource = bankAccountManager.Select(); }