/// <summary> /// 构造函数,初始化 /// </summary> /// <param name="condition"></param> public Q58(ConditionProduceStatisticsCheck condition) { InitializeComponent(); IList <Model.ProduceStatisticsCheck> list = produceStatisticsCheckManager.SelectBycondition(condition.StartDate, condition.EndDate, condition.StartProduceStatisticsCheckId, condition.EndProduceStatisticsCheckId, condition.StartPronoteHeaderID, condition.EndPronoteHeaderID); if (list == null || list.Count <= 0) { throw new global::Helper.InvalidValueException(); } this.xrLabelPrintDate.Text += DateTime.Now.ToShortDateString(); this.xrLabelRepotName.Text = BL.Settings.CompanyChineseName; this.xrLabelDataName.Text = "生產車間質檢"; this.DataSource = list; this.xrLabelProduceStatisticsId.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheck.PRO_ProduceStatisticsCheckId); this.xrLabelProduceStatisticsDate.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheck.PRO_ProduceStatisticsCheckDate, "{0:yyyy-MM-dd}"); this.xrLabelEmployee.DataBindings.Add("Text", this.DataSource, "Employee1." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrLabelCustomerXoId.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheck.PRO_CustomerInvoiceXOId); this.xrLabelPronoteHeaderID.DataBindings.Add("Text", this.DataSource, "PronoteHeader." + Model.PronoteHeader.PRO_PronoteHeaderID); this.xrLabelPronotedesc.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheck.PRO_Description); this.xrSubreport1.ReportSource = new Q58_1(condition); }
protected override void OnOK() { if (this.condition == null) { this.condition = new ConditionProduceStatisticsCheck(); } this.condition.StartDate = this.dateEditStartDate.Text == "" ? global::Helper.DateTimeParse.NullDate : this.dateEditStartDate.DateTime; this.condition.EndDate = this.dateEditEndDate.Text == "" ? System.DateTime.Now : this.dateEditEndDate.DateTime; this.condition.StartProduceStatisticsCheckId = this.buttonEditProduceStatisticsCheckId1.EditValue == null ? null : this.buttonEditProduceStatisticsCheckId1.EditValue.ToString(); this.condition.EndProduceStatisticsCheckId = this.buttonEditProduceStatisticsCheckId2.EditValue == null ? null : this.buttonEditProduceStatisticsCheckId2.EditValue.ToString(); this.condition.StartPronoteHeaderID = this.buttonEditPronoteHeader1.EditValue == null ? null : this.buttonEditPronoteHeader1.EditValue.ToString(); this.condition.EndPronoteHeaderID = this.buttonEditPronoteHeader2.EditValue == null ? null : this.buttonEditPronoteHeader2.EditValue.ToString(); }
/// 构造函数,初始化 /// </summary> /// <param name="condition"></param> public Q58_1(ConditionProduceStatisticsCheck condition) { InitializeComponent(); this._ProduceStatisticCheck = condition; //明细 this.xrTableCellDate.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_DetailDate, "{0:yyyy-MM-dd}"); this.xrTableCellType.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_BusinessHoursType); this.xrTableCellEllo.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrTableCellElpple.DataBindings.Add("Text", this.DataSource, "Employee1." + Model.Employee.PROPERTY_EMPLOYEENAME); this.xrTableCellPcount.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_ProduceQuantity); this.xrTableCellNoPcount.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_FractionDefective); this.xrTableCell10.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_APian); this.xrTableCell11.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_BPian); this.xrTableCell12.DataBindings.Add("Text", this.DataSource, Model.ProduceStatisticsCheckDetail.PRO_CPian); }