Пример #1
0
        public Q55(ConditionOtherExit condition)
        {
            InitializeComponent();
            IList <Model.ProduceOtherExitMaterial> list = produceOtherExitMaterialManager.SelectByCondition(condition.StartDate, condition.EndDate, condition.ProduceOtherCompactId1, condition.ProduceOtherCompactId2, condition.SupplierId1, condition.SupplierId2, condition.ProductId1, condition.ProductId2);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("No data");
            }
            if (!global::Helper.DateTimeParse.DateTimeEquls(condition.StartDate, global::Helper.DateTimeParse.NullDate))
            {
                this.xrLabelDateRange.Text = "From  " + condition.StartDate.ToString("yyyy-MM-dd");
            }
            this.xrLabelDateRange.Text += "   To   " + condition.EndDate.ToString("yyyy-MM-dd");
            this.ReportDate.Text       += System.DateTime.Now.Date;
            this.xrLabelRepotName.Text  = BL.Settings.CompanyChineseName;
            this.xrLabelTitle.Text      = Properties.Resources.ProduceOtherExitDetail;
            this.DataSource             = list;

            this.ProduceOtherExitMaterialId.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherExitMaterial.PRO_ProduceOtherExitMaterialId);
            this.Employee0.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.Employee1.DataBindings.Add("Text", this.DataSource, "Employee1." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.SupplierId.DataBindings.Add("Text", this.DataSource, "Supplier." + Model.Supplier.PROPERTY_SUPPLIERSHORTNAME);
            this.DepotId.DataBindings.Add("Text", this.DataSource, "Depot." + Model.Depot.PRO_DepotName);
            this.xrSubreport1.ReportSource = new Q55_1(condition);
        }
Пример #2
0
 public Q55_1(ConditionOtherExit condition)
 {
     InitializeComponent();
     this._otherExit = condition;
     this.xrTableProID.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_Id);
     this.xrTableProName.DataBindings.Add("Text", this.DataSource, "Product." + Model.Product.PRO_ProductName);
     this.xrTableQuanTity.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherExitDetail.PRO_ProduceQuantity);
     this.xrTableUnit.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherExitDetail.PRO_ProductUnit);
     this.xrTableXOid.DataBindings.Add("Text", this.DataSource, Model.ProduceOtherExitDetail.PRO_InvoiceXOId);
     this.xrTableDepotPosition.DataBindings.Add("Text", this.DataSource, "DepotPosition." + Model.DepotPosition.PROPERTY_ID);
 }
Пример #3
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionOtherExit();
            }

            this.condition.StartDate              = this.dateEditStartDate.EditValue == null ? global::Helper.DateTimeParse.NullDate : this.dateEditStartDate.DateTime;
            this.condition.EndDate                = this.dateEditEndDate.EditValue == null ? System.DateTime.Now : this.dateEditEndDate.DateTime;
            this.condition.SupplierId1            = this.newChooseContorlSupplier1.EditValue == null ? null : (this.newChooseContorlSupplier1.EditValue as Model.Supplier).SupplierId;
            this.condition.SupplierId2            = this.newChooseContorlSupplier2.EditValue == null ? null : (this.newChooseContorlSupplier2.EditValue as Model.Supplier).SupplierId;
            this.condition.ProduceOtherCompactId1 = this.buttonEditProduceOtherCompactId1.EditValue == null ? null : this.buttonEditProduceOtherCompactId1.Text;
            this.condition.ProduceOtherCompactId2 = this.buttonEditProduceOtherCompactId2.EditValue == null ? null : this.buttonEditProduceOtherCompactId2.Text;
            this.condition.ProductId1             = this.StartProductId.EditValue == null ? null : (this.StartProductId.EditValue as Model.Product).Id;
            this.condition.ProductId2             = this.EndProductId.EditValue == null ? null : (this.EndProductId.EditValue as Model.Product).Id;
        }