public XRProperty(ConditionProperty condition) { InitializeComponent(); this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = "Depreciation of property"; decimal?k = 0; IList <Model.AtProperty> list = detailManager.SelectByPropertyId(condition.StartPropertyId, condition.EndPropertyId); this.xrLabel2.Text = DateTime.Now.ToShortDateString(); if (list != null) { foreach (Model.AtProperty at in list) { k += at.DepreciationMoney; } } this.DataSource = list; this.xrLabel3.Text = "Total£º " + k.ToString(); this.xrTableCell8.DataBindings.Add("Text", this.DataSource, Model.AtProperty.PRO_Id); this.xrTableCell9.DataBindings.Add("Text", this.DataSource, Model.AtProperty.PRO_PropertyName); this.xrTableCell10.DataBindings.Add("Text", this.DataSource, Model.AtProperty.PRO_DepreciationDate, "{0:yyyy-MM-dd}"); this.xrTableCell11.DataBindings.Add("Text", this.DataSource, Model.AtProperty.PRO_DepreciationMoney); this.xrTableCell12.DataBindings.Add("Text", this.DataSource, Model.AtProperty.PRO_Mark); }
protected override void OnOK() { if (this.condition == null) { this.condition = new ConditionProperty(); } if (this.newChooseContorl1.EditValue != null) { this.condition.StartPropertyId = (this.newChooseContorl1.EditValue as Model.AtProperty).PropertyId; } if (this.newChooseContorl2.EditValue != null) { this.condition.EndPropertyId = (this.newChooseContorl2.EditValue as Model.AtProperty).PropertyId; } }