Beispiel #1
0
        public XRYS2(ConditionYS2 condition)
        {
            InitializeComponent();
            decimal?a = 0;

            this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName;
            this.xrLabelDataName.Text        = Properties.Resources.YS1;
            IList <Model.AtBillsIncome> list = detailManager.Select(condition.StartDate, condition.EndDate, condition.StartBankAccountId, condition.EndBankAccountId);

            this.xrLabel2.Text = DateTime.Now.ToShortDateString();
            this.xrLabel1.Text = "日期区间:" + condition.StartDate.ToShortDateString() + "至" + condition.EndDate.ToShortDateString();
            if (list != null)
            {
                foreach (Model.AtBillsIncome at in list)
                {
                    if (at.IncomeCategory == "收票")
                    {
                        a += at.NotesMoney;
                        at.PassingObject     = new BL.CustomerManager().Get(at.PassingObject) == null ? null : new BL.CustomerManager().Get(at.PassingObject).CustomerShortName;
                        at.CollectionAccount = new BL.AtBankAccountManager().Get(at.CollectionAccount) == null ? null : new BL.AtBankAccountManager().Get(at.CollectionAccount).BankAccountName;
                        oList.Add(at);
                    }
                }
            }
            this.DataSource    = oList;
            this.xrLabel3.Text = "合計金額:" + a.ToString();
            this.xrTableCellTheOpenDate.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_TheOpenDate, "{0:yyyy-MM-dd}");
            this.xrTableCellBillsId.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Id);
            this.xrTableCellTheJpy.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_TheJpy, "{0:yyyy-MM-dd}");
            this.xrTableCell12.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_Maturity, "{0:yyyy-MM-dd}");
            this.xrTableCell13.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_CollectionAccount);
            this.xrTableCell14.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_PassingObject);
            this.xrTableCell15.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_BillsOften);
            this.xrTableCell16.DataBindings.Add("Text", this.DataSource, Model.AtBillsIncome.PRO_NotesMoney);
        }
Beispiel #2
0
 protected override void OnOK()
 {
     if (this.condition == null)
     {
         this.condition = new ConditionYS2();
     }
     this.condition.StartDate = this.dateEditStartDate.DateTime;
     this.condition.EndDate   = this.dateEditEndDate.DateTime;
     if (this.newChooseContorl1.EditValue != null)
     {
         this.condition.StartBankAccountId = (this.newChooseContorl1.EditValue as Model.AtBankAccount).BankAccountId;
     }
     if (this.newChooseContorl2.EditValue != null)
     {
         this.condition.EndBankAccountId = (this.newChooseContorl2.EditValue as Model.AtBankAccount).BankAccountId;
     }
 }