예제 #1
0
        protected override void OnOK()
        {
            if (this.condition == null)
            {
                this.condition = new ConditionMRS();
            }
            this.condition.StartDate     = this.dateEditStartDate.EditValue == null ? global::Helper.DateTimeParse.NullDate : this.dateEditStartDate.DateTime.Date;
            this.condition.EndDate       = this.dateEditEndDate.EditValue == null ? global::Helper.DateTimeParse.EndDate : this.dateEditEndDate.DateTime.Date.AddDays(1).AddSeconds(-1);
            this.condition.CustomerStart = this.buttonEditCustomerStart.Text == "" ? null : this.buttonEditCustomerStart.Text;
            this.condition.CustomerEnd   = this.buttonEditCustomerEnd.Text == "" ? null : this.buttonEditCustomerEnd.Text;
            this.condition.MrsStart      = this.textEditMpsStart.Text == "" ? null : this.textEditMpsStart.Text;
            this.condition.MrsEnd        = this.textEditMpsEnd.Text == "" ? null : this.textEditMpsEnd.Text;
            if (this.cboSourceType.SelectedIndex == 0 || this.cboSourceType.SelectedIndex == -1)
            {
                this.condition.SourceType = -1;
            }
            else if (this.cboSourceType.SelectedIndex <= 2)
            {
                this.condition.SourceType = this.cboSourceType.SelectedIndex - 1;
            }
            else
            {
                this.condition.SourceType = this.cboSourceType.SelectedIndex;
            }
            this.condition.Product = this.buttonEditPro.EditValue as Model.Product;
            this.condition.Id1     = this.textEditid1.Text;
            this.condition.Id2     = this.textEditid2.Text;
            this.condition.Cusxoid = this.textEditCusxoid.Text;

            this.condition.OrderColumn     = this.comBox_OrderColumn.SelectedIndex == -1 ? 0 : this.comBox_OrderColumn.SelectedIndex;
            this.condition.OrderType       = this.comBox_OrderType.SelectedIndex == -1 ? 0 : this.comBox_OrderType.SelectedIndex;
            this.condition.ProductCategory = this.newChooseProductCate.EditValue as Model.ProductCategory;
        }
예제 #2
0
        public ROMRSDetailsList(ConditionMRS condition)
            : this()
        {
            DateTime start = condition.StartDate;
            DateTime end   = condition.EndDate;

            this.xrLabelReportName.Text = Properties.Resources.MRSDetails;

            this.xrLabelDateRange.Text = string.Format(Properties.Resources.DateRange, start.ToString("yyyy-MM-dd"), end.ToString("yyyy-MM-dd"));
            IList <Model.MRSdetails> Details = mrsdManager.SelectbyCondition(condition.MrsStart, condition.MrsEnd, condition.CustomerStart, condition.CustomerEnd, condition.StartDate, condition.EndDate, condition.SourceType, condition.Id1, condition.Id2, condition.Cusxoid, condition.Product, condition.OrderColumn, condition.OrderType, condition.ProductCategory);

            if (Details == null || Details.Count == 0)
            {
                return;
            }


            //foreach (Model.MRSdetails mrsd in Details)
            //{
            //    mrsd.MRSHeader.CustomerInvoiceXOId = invoicexoManager.SelectMrsIsClose(mrsd.MRSHeader, 0).CustomerInvoiceXOId;
            //}

            this.DataSource = Details;

            //Ã÷ϸ°ó¶¨
            this.TCbianhao.DataBindings.Add("Text", this.DataSource, Model.MRSHeader.PRO_MRSHeaderId);
            this.TCcs.DataBindings.Add("Text", this.DataSource, "SupplierId");
            this.TCdw.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_ProductUnit);
            this.TCjq.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_JiaoHuoDate, "{0:yyyy-MM-dd}");
            this.TCkh.DataBindings.Add("Text", this.DataSource, "CustomerName");
            this.TCkhddbh.DataBindings.Add("Text", this.DataSource, "CustomerInvoiceXOId");
            this.TCkhxh.DataBindings.Add("Text", this.DataSource, "CustomerProductName");
            this.TCpdms.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_ArrangeDesc);
            this.TCrq.DataBindings.Add("Text", this.DataSource, Model.MRSHeader.PRO_MRSstartdate, "{0:yyyy-MM-dd}");
            this.TCscjh.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_MPSheaderId);
            this.TCsl.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_MRSdetailssum);
            this.TCspmc.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.TCxqly.DataBindings.Add("Text", this.DataSource, "SourceTypeName");
            //this.TCsplb.DataBindings.Add("Text", this.DataSource, "ProductCategoryName");
            this.TCkucun.DataBindings.Add("Text", this.DataSource, "StocksQuantity");
            this.TCjhsl.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_MRSdetailsQuantity);
            this.xrTableFenPei.DataBindings.Add("Text", this.DataSource, "ProduceDistributioned");
            //this.xrTableOrderWay.DataBindings.Add("Text", this.DataSource, "OrderOnWayQuantity");


            this.xrlblTotalShuliang.Summary.FormatString     = "{0:0}";
            this.xrlblTotalShuliang.Summary.Func             = SummaryFunc.Sum;
            this.xrlblTotalShuliang.Summary.IgnoreNullValues = true;
            this.xrlblTotalShuliang.Summary.Running          = SummaryRunning.Report;
            this.xrlblTotalShuliang.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_MRSdetailssum);
        }
예제 #3
0
        public Q59(ConditionMRS condition)
        {
            InitializeComponent();
            this.condition = condition;
            IList <Model.MRSHeader> list = this.mrsHeaderManager.SelectbyCondition(condition.MrsStart, condition.MrsEnd, condition.CustomerStart, condition.CustomerEnd, condition.StartDate, condition.EndDate, condition.SourceType, condition.Id1, condition.Id2, condition.Cusxoid, condition.Product);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException();
            }
            this.DataSource       = list;
            this.ReportName.Text  = BL.Settings.CompanyChineseName;
            this.ReportTitle.Text = Properties.Resources.MRSDetails;
            this.xrLabelCustomer.DataBindings.Add("Text", this.DataSource, "Customer." + Model.Customer.PRO_CustomerShortName);
            this.xrLabelEmployee0Id.DataBindings.Add("Text", this.DataSource, "Employee0." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.xrLabelEmployee1Id.DataBindings.Add("Text", this.DataSource, "Employee1." + Model.Employee.PROPERTY_EMPLOYEENAME);
            this.xrLabelMRSheaderId.DataBindings.Add("Text", this.DataSource, Model.MRSdetails.PRO_MRSHeaderId);
            this.xrLabelMpsId.DataBindings.Add("Text", this.DataSource, Model.MRSHeader.PRO_MPSheaderId);
            this.xrLabelMPSStartDate.DataBindings.Add("Text", this.DataSource, Model.MRSHeader.PRO_MRSstartdate);
            this.xrLabelMRSheaderDesc.DataBindings.Add("Text", this.DataSource, Model.MRSHeader.PRO_MRSheaderDesc);

            this.xrSubreport1.ReportSource = new Q59_1();
        }