예제 #1
0
        public ROJGZhishiDetail(Query.ConditionPronoteHeader condition)
        {
            InitializeComponent();
            IList <Model.PronoteHeader> list = pronoteHeaderManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, false, false, true, true);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("無數據");
            }
            foreach (Model.PronoteHeader detail in list)
            {
                if (!string.IsNullOrEmpty(detail.InvoiceXOId))
                {
                    detail.InvoiceXO = this.xomanamager.Get(detail.InvoiceXOId);
                }
                detail.MRSDetails = this.mrsdetailManager.Get(detail.MRSdetailsId);

                if (string.IsNullOrEmpty(detail.CustomerProductName))
                {
                    detail.CustomerProductName = new Help().GetCustomerProductNameByPronoteHeaderId(detail.PronoteHeaderID, detail.ProductId);
                }
            }
            this.DataSource           = list;
            this.xrLabelDataName.Text = Properties.Resources.GZZhiShi;
            this.bind(condition.SourceTpye);
        }
예제 #2
0
        public ROZZJiaGongDetail(Query.ConditionPronoteHeader condition)
        {
            InitializeComponent();
            IList <Model.PronoteHeader> list = pronoteHeaderManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, true, false, false);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException();
            }
            foreach (Model.PronoteHeader detail in list)
            {
                if (!string.IsNullOrEmpty(detail.InvoiceXOId))
                {
                    detail.InvoiceXO = this.xomanamager.Get(detail.InvoiceXOId);
                }
                detail.MRSDetails = this.mrsdetailManager.Get(detail.MRSdetailsId);
            }
            this.DataSource           = list;
            this.xrLabelDataName.Text = Properties.Resources.Pronotedetails;

            //if (condition.SourceTpye == 5)
            //{
            //    this.xrLabelDataName.Text = Properties.Resources.GZZhiShi;

            //}
            //else if (condition.SourceTpye == 4)
            //{
            //    this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong;
            //}
            this.bind(condition.SourceTpye);
        }
예제 #3
0
        public RODetail(Query.ConditionPronoteHeader condition)
        {
            InitializeComponent();
            IList <Model.PronoteHeader> list = pronoteHeaderManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, false, true, false);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("無數據");
            }
            foreach (Model.PronoteHeader detail in list)
            {
                if (!string.IsNullOrEmpty(detail.InvoiceXOId))
                {
                    detail.InvoiceXO = this.xomanamager.Get(detail.InvoiceXOId);
                }
                detail.MRSDetails = this.mrsdetailManager.Get(detail.MRSdetailsId);
                if (!string.IsNullOrEmpty(detail.ProductId))
                {
                    detail.Product = new BL.ProductManager().Get(detail.ProductId);
                }
            }
            this.DataSource = list;
            //CompanyInfo
            this.xrLabelCompanyInfoName.Text = BL.Settings.CompanyChineseName;
            this.xrLabelDataName.Text        = Properties.Resources.ZZJiaGong;


            this.xrLabelPrintDate.Text = this.xrLabelPrintDate.Text + DateTime.Now.ToShortDateString();
            this.xrLabelPronoteHeaderID.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteHeaderID);
            this.xrLabelPronoteDte.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteDate, "{0:yyyy-MM-dd}");

            this.xrLabelCustomerXOId.DataBindings.Add("Text", this.DataSource, Model.InvoiceXO.PRO_CustomerInvoiceXOId);
            this.lblCustomerId.DataBindings.Add("Text", this.DataSource, "InvoiceXO.Customer." + Model.Customer.PRO_Id);
            this.xrLabelCustomer.DataBindings.Add("Text", this.DataSource, "CustomerShortName");
            //this.xrLabelCheckedStandard.DataBindings.Add("Text", this.DataSource, "CustomerCheckStandard");
            //this.xrLabelCustomerProductName.DataBindings.Add("Text", this.DataSource, "CustomerProductName");
            this.xrLabelCount.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_DetailsSum);

            this.xrLabelUnit.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_ProductUnit);
            this.xrLabelXOJHDate.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_InvoiceYjrq, "{0:yyyy-MM-dd}");
            //this.xrLabelPiHao.DataBindings.Add("Text", this.DataSource, "InvoiceXO." + Model.InvoiceXO.PRO_CustomerLotNumber);
            this.xrLabelProductName.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.xrRichTextProDesc.DataBindings.Add("Rtf", this.DataSource, "ProductDesc");
            this.RichTextZhengMai.DataBindings.Add("Rtf", this.DataSource, "Product." + Model.Product.PRO_AttrZhengMai);
            this.RichTextCeMai.DataBindings.Add("Rtf", this.DataSource, "Product." + Model.Product.PRO_AttrCeMai);
            this.xrLabelMRP.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_MRSHeaderId);
            this.xrLabelWorkHouse.DataBindings.Add("Text", this.DataSource, "Workhousename");
            this.xrLabelBeforepPackage.DataBindings.Add("Text", this.DataSource, "MRSDetails.BeforePackageProduct." + Model.Product.PRO_ProductName);
            this.xrLabel14.DataBindings.Add("Text", this.DataSource, "AuditEmpName");
            this.GroupHeader1.GroupFields.Add(new GroupField(Model.PronoteHeader.PRO_PronoteHeaderID));
            // this.GroupFooter1.gr.Add(new GroupField(Model.PronoteHeader.PRO_PronoteHeaderID));
            this.xrLabelPronotedesc.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_Pronotedesc);
            this.xrLabelEmployee.DataBindings.Add("Text", this.DataSource, "Employee0Name");
            this.xrSubreport1.ReportSource = new RO1();
            this.xrSubreport2.ReportSource = new RO2();
        }
예제 #4
0
        public RODetail(Query.ConditionPronoteHeader condition)
        {
            InitializeComponent();
            IList <Model.PronoteHeader> list = pronoteHeaderManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, false, true, false, false);

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("無數據");
            }

            BindData(list);
        }
예제 #5
0
        /// <summary>
        /// 构造函数,初始化 加工单
        /// </summary>
        /// <param name="condition"></param>
        public Q49(ConditionPronoteHeader condition)
        {
            InitializeComponent();
            this.condition = condition;
            IList <Model.PronoteHeader> list = detailManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, false, false, false, false);

            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   = Properties.Resources.PronoteHeaderDetails;
            if (list != null)
            {
                foreach (Model.PronoteHeader ph in list)
                {
                    Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(ph.InvoiceXOId);
                    if (xo != null)
                    {
                        ph.CustomerShortName   = xo.xocustomer.CustomerShortName;
                        ph.CustomerInvoiceXOId = xo.CustomerInvoiceXOId;
                    }
                    headerList1.Add(ph);
                }
            }
            this.DataSource = headerList1;
            //生產通知
            this.xrLabelPronoteHeaderID.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteHeaderID);
            this.xrLabelPronoteDte.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_PronoteDate, "{0:yyyy-MM-dd}");
            this.xrLabelEmployee.DataBindings.Add("Text", this.DataSource, "Employee0Name");
            this.xrLabelProductName.DataBindings.Add("Text", this.DataSource, "ProductName");
            this.xrLabelCustomerProductName.DataBindings.Add("Text", this.DataSource, "CustomerProductName");
            this.xrLabelCustomer.DataBindings.Add("Text", this.DataSource, "CustomerShortName");
            this.xrLabelCustomerXOId.DataBindings.Add("Text", this.DataSource, "CustomerInvoiceXOId");
            this.xrLabelCount.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_DetailsSum);
            this.xrLabelUnit.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_ProductUnit);
            this.xrLabelPronotedesc.DataBindings.Add("Text", this.DataSource, Model.PronoteHeader.PRO_Pronotedesc);
            this.xrRichTextProDesc.DataBindings.Add("Rtf", this.DataSource, "ProductDesc");
            this.xrSubreport1.ReportSource = new Q49_1();
            this.xrSubreport2.ReportSource = new Q49_2();
        }
예제 #6
0
        public ROZZJiaGongDetail(Query.ConditionPronoteHeader condition)
        {
            InitializeComponent();
            //IList<Model.PronoteHeader> list = pronoteHeaderManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey,true, false, false);
            IList <Model.PronoteHeader> list = pronoteHeaderManager.GetByDateMa(condition.StartDate, condition.EndDate, condition.Customer, condition.CusXOId, condition.Product, condition.PronoteHeaderIdStart, condition.PronoteHeaderIdEnd, condition.SourceTpye, null, false, condition.ProNameKey, condition.ProCusNameKey, condition.PronoteHeaderIdKey, false, false, false, condition.HandbookId);   //已经有了condition.SourceTpye条件

            if (list == null || list.Count <= 0)
            {
                throw new global::Helper.InvalidValueException("無數據");
            }
            foreach (Model.PronoteHeader detail in list)
            {
                if (!string.IsNullOrEmpty(detail.InvoiceXOId))
                {
                    detail.InvoiceXO = this.xomanamager.Get(detail.InvoiceXOId);
                }
                detail.MRSDetails = this.mrsdetailManager.Get(detail.MRSdetailsId);
                //if (detail.MRSDetails != null)
                //    detail.Plannum = detail.MRSDetails.MRSdetailsQuantity;

                if (string.IsNullOrEmpty(detail.CustomerProductName))
                {
                    detail.CustomerProductName = CommonHelp.GetCustomerProductNameByPronoteHeaderId(detail, detail.ProductId, detail.HandbookProductId);
                }
            }
            this.DataSource           = list;
            this.xrLabelDataName.Text = Properties.Resources.Pronotedetails;

            if (condition.SourceTpye == 5)
            {
                this.xrLabelDataName.Text = Properties.Resources.GZZhiShi;
            }
            else if (condition.SourceTpye == 4)
            {
                this.xrLabelDataName.Text = Properties.Resources.ZZJiaGong;
            }
            this.bind();
        }