Exemplo n.º 1
0
 protected override void OnOK()
 {
     if (this.condition == null)
     {
         this.condition = new ConditionFP();
     }
     this.condition.Supplier = this.nccSupplier.EditValue as Model.Supplier;
     if (condition.Supplier == null)
     {
         //MessageBox.Show(Properties.Resources.Supplier, this.Text, MessageBoxButtons.OK);
         //return;
         throw new Helper.MessageValueException(Properties.Resources.Supplier);
     }
     this.condition.StartDate = this.dateEditStart.EditValue == null ? global::Helper.DateTimeParse.NullDate : this.dateEditStart.DateTime;
     this.condition.EndDate   = this.dateEditEnd.EditValue == null ? global::Helper.DateTimeParse.EndDate : this.dateEditEnd.DateTime;
     this.DialogResult        = DialogResult.OK;
 }
Exemplo n.º 2
0
        public ROFP(ConditionFP fp)
            : this()
        {
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblReportName.Text  = "Schedule of accounts payable invoice";
            //this.lblDateRange.Text = fp.StartDate.ToString("yyyy-MM-dd") + " - " + fp.EndDate.ToString("yyyy-MM-dd");
            //this.lblSupplier.Text = fp.Supplier.SupplierFullName;
            this.lblReportDate.Text += DateTime.Now.ToString("yyyy-MM-dd");

            this.DataSource = manager.GetByDateRangeAndSupplier(fp.StartDate, fp.EndDate, fp.Supplier.SupplierId);

            this.TCFPDate.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPDate, "{0:yyyy-MM-dd}");
            this.TCFPId.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPId);
            this.TCFPSupplier.DataBindings.Add("Text", this.DataSource, "FPSupplier.SupplierFullName");
            this.TCFPHeader.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPHeader);
            this.TCFPMoney.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPMoney, "{0:0.##}");
            this.TCFPTax.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPTax, "{0:0.##}");
            this.TCFPTotalMoney.DataBindings.Add("Text", this.DataSource, Model.ShouldPayAccountDetail.PRO_FPTotalMoney, "{0:0.##}");
        }