コード例 #1
0
        /// <summary>
        /// Insert a PCFinishCheck.
        /// </summary>
        public void Insert(Model.PCFinishCheck pCFinishCheck)
        {
            Validate(pCFinishCheck);
            try
            {
                BL.V.BeginTransaction();

                TiGuiExists(pCFinishCheck);

                pCFinishCheck.InsertTime = DateTime.Now;
                pCFinishCheck.UpdateTime = DateTime.Now;

                string invoiceKind   = this.GetInvoiceKind().ToLower();
                string sequencekey_y = string.Format("{0}-y-{1}", invoiceKind, pCFinishCheck.InsertTime.Value.Year);
                string sequencekey_m = string.Format("{0}-m-{1}-{2}", invoiceKind, pCFinishCheck.InsertTime.Value.Year, pCFinishCheck.InsertTime.Value.Month);
                string sequencekey_d = string.Format("{0}-d-{1}", invoiceKind, pCFinishCheck.InsertTime.Value.ToString("yyyy-MM-dd"));
                string sequencekey   = string.Format(invoiceKind);
                SequenceManager.Increment(sequencekey_y);
                SequenceManager.Increment(sequencekey_m);
                SequenceManager.Increment(sequencekey_d);
                SequenceManager.Increment(sequencekey);

                accessor.Insert(pCFinishCheck);

                BL.V.CommitTransaction();
            }
            catch
            {
                BL.V.RollbackTransaction();
                throw;
            }
        }
コード例 #2
0
ファイル: EditForm.cs プロジェクト: daobataotie/EDERP
        public override void Refresh()
        {
            if (this._PCFC == null)
            {
                this.AddNew();
                this.action = "insert";
            }
            else
            {
                if (this.action == "view")
                {
                    this._PCFC = this._PCFCManager.Get(this._PCFC.PCFinishCheckID);
                }
            }

            this.txtPCFinishCheckID.Text = this._PCFC.PCFinishCheckID;
            //this.txtInvoiceCusXOId.Text = this._PCFC.InvoiceCusXOId;
            if (this._PCFC.PronoteHeader != null)
            {
                this.txtInvoiceCusXOId.Text = (this._PCFC.PronoteHeader.InvoiceXO == null ? null : this._PCFC.PronoteHeader.InvoiceXO.CustomerInvoiceXOId);
            }
            else
            {
                this.txtInvoiceCusXOId.Text = null;
            }

            base.Refresh();

            this.txtPCFinishCheckID.Properties.ReadOnly = true;
        }
コード例 #3
0
 protected override void MoveLast()
 {
     if (LastFlag == 1)
     {
         LastFlag = 0; return;
     }
     this._PCFC = this._PCFCManager.Get(this._PCFCManager.GetLast() == null ? "" : this._PCFCManager.GetLast().PCFinishCheckID);
 }
コード例 #4
0
 protected override void MovePrev()
 {
     Model.PCFinishCheck pcfc = this._PCFCManager.GetPrev(this._PCFC);
     if (pcfc == null)
     {
         throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows);
     }
     this._PCFC = this._PCFCManager.Get(pcfc.PCFinishCheckID);
 }
コード例 #5
0
 protected override void AddNew()
 {
     this._PCFC = new Book.Model.PCFinishCheck();
     this._PCFC.PCFinishCheckID    = this._PCFCManager.GetId();
     this._PCFC.PCFinishCheckDate  = DateTime.Now.Date;
     this._PCFC.PCFinishCheckCount = 1;  //默认抽检数量为1
     //this._PCFC.Employee0 = BL.V.ActiveOperator.Employee;
     //this._PCFC.Employee0Id = BL.V.ActiveOperator.EmployeeId;
 }
コード例 #6
0
 public EditForm(Model.PCFinishCheck mPCFC, string action)
     : this()
 {
     this._PCFC  = mPCFC;
     this.action = action;
     if (this.action == "view")
     {
         LastFlag = 1;
     }
 }
コード例 #7
0
 /// <summary>
 /// Update a PCFinishCheck.
 /// </summary>
 public void Update(Model.PCFinishCheck pCFinishCheck)
 {
     Validate(pCFinishCheck);
     if (pCFinishCheck != null)
     {
         pCFinishCheck.UpdateTime = DateTime.Now;
         accessor.Update(pCFinishCheck);
         //this.Delete(pCFinishCheck.PCFinishCheckID);
         //pCFinishCheck.UpdateTime = DateTime.Now;
         //this.Insert(pCFinishCheck);
     }
 }
コード例 #8
0
        private void barBtn_Search_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ListForm lf = new ListForm();

            if (lf.ShowDialog(this) == DialogResult.OK)
            {
                this._PCFC  = lf.SelectItem as Model.PCFinishCheck;
                this.action = "view";
                this.Refresh();
            }
            lf.Dispose();
            GC.Collect();
        }
コード例 #9
0
        public override void Refresh()
        {
            if (this._PCFC == null)
            {
                this.AddNew();
                this.action = "insert";
            }
            else
            {
                if (this.action == "view")
                {
                    this._PCFC = this._PCFCManager.Get(this._PCFC.PCFinishCheckID);
                }
                this.SetDefRadioGroup();
            }

            this.txtPCFinishCheckID.Text = this._PCFC.PCFinishCheckID;
            //this.txtInvoiceCusXOId.Text = this._PCFC.InvoiceCusXOId;
            if (this._PCFC.PronoteHeader != null)
            {
                this.txtInvoiceCusXOId.Text = (this._PCFC.PronoteHeader.InvoiceXO == null ? null : this._PCFC.PronoteHeader.InvoiceXO.CustomerInvoiceXOId);
            }
            else
            {
                this.txtInvoiceCusXOId.Text = null;
            }
            this.txtPCFinishCheckDesc.Text   = this._PCFC.PCFinishCheckDesc;
            this.DE_JYDRQ.EditValue          = this._PCFC.PCFinishCheckDate;
            this.txtProduct.Text             = this._PCFC.Product == null ? "" : this._PCFC.Product.ToString();
            this.CE_Count.EditValue          = this._PCFC.PCFinishCheckCount.HasValue ? this._PCFC.PCFinishCheckCount : 0;
            this.CE_InCount.EditValue        = this._PCFC.PCFinishCheckInCoiunt.HasValue ? this._PCFC.PCFinishCheckInCoiunt : 0;
            this.txtCustomerProductName.Text = this._PCFC.CustomerProductName;
            this.txtPronoteHeaderId.Text     = this._PCFC.PronoteHeaderID;
            //this.lblCustomerType.Text = this._PCFC.CustomerType;
            this.nccEmployee0.EditValue = this._PCFC.Employee0;
            this.nccEmployee1.EditValue = this._PCFC.Employee1;
            this.nccWorkHouse.EditValue = this._PCFC.WorkHouse;

            this.chkMuShiJianYan.Checked = this._PCFC.IsMuShiJianYan.HasValue ? this._PCFC.IsMuShiJianYan.Value : false;

            this.newChooseContorlAuditEmp.EditValue = this._PCFC.AuditEmp;
            this.txt_AuditState.EditValue           = this.GetAuditName(this._PCFC.AuditState);
            this.lookUpEditUnit.EditValue           = this._PCFC.ProductUnitId;
            this.txt_AnnualRing.Text      = this._PCFC.AnnualRing;
            this.txt_Pihao.EditValue      = this._PCFC.Pihao;
            this.txt_InvoiceCountNum.Text = this._PCFC.InvoiceCountNum;

            base.Refresh();

            this.txtPCFinishCheckID.Properties.ReadOnly = true;
        }
コード例 #10
0
 public EditForm(Model.PCFinishCheck mPCFC)
     : this()
 {
     if (mPCFC == null)
     {
         throw new ArithmeticException("invoiceid");
     }
     this._PCFC  = mPCFC;
     this.action = "view";
     if (this.action == "view")
     {
         LastFlag = 1;
     }
 }
コード例 #11
0
 public EditForm(string invoiceId)
     : this()
 {
     this._PCFC = this._PCFCManager.Get(invoiceId);
     if (this._PCFC == null)
     {
         throw new ArithmeticException("invoiceid");
     }
     this.action = "view";
     if (this.action == "view")
     {
         LastFlag = 1;
     }
 }
コード例 #12
0
ファイル: EditForm.cs プロジェクト: daobataotie/EDERP
        protected override void AddNew()
        {
            this._PCFC = new Book.Model.PCFinishCheck();
            this._PCFC.PCFinishCheckID    = this._PCFCManager.GetId();
            this._PCFC.PCFinishCheckDate  = DateTime.Now.Date;
            this._PCFC.PCFinishCheckCount = 1;  //默认抽检数量为1
            this._PCFC.Employee0          = BL.V.ActiveOperator.Employee;
            this._PCFC.Employee0Id        = BL.V.ActiveOperator.EmployeeId;

            //清空複製的光學測試信息
            if (ListOpticsTest != null)
            {
                ListOpticsTest.Clear();
            }
        }
コード例 #13
0
        protected override void AddNew()
        {
            this._PCFC = new Book.Model.PCFinishCheck();
            this._PCFC.PCFinishCheckID    = this._PCFCManager.GetId();
            this._PCFC.PCFinishCheckDate  = DateTime.Now.Date;
            this._PCFC.PCFinishCheckCount = 1;  //默认抽检数量为1
            this._PCFC.Employee0          = BL.V.ActiveOperator.Employee;
            this._PCFC.Employee0Id        = BL.V.ActiveOperator.EmployeeId;
            this._PCFC.ProductUnitId      = "f4736af8-3486-455d-905f-9ff51622327e"; //盒

            //清空複製的光學測試信息
            if (ListOpticsTest != null)
            {
                ListOpticsTest.Clear();
            }
        }
コード例 #14
0
 protected override void Delete()
 {
     if (this._PCFC == null)
     {
         return;
     }
     if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
     {
         return;
     }
     this._PCFCManager.Delete(this._PCFC.PCFinishCheckID);
     this._PCFC = this._PCFCManager.GetNext(this._PCFC);
     if (this._PCFC == null)
     {
         this._PCFC = this._PCFCManager.GetLast();
     }
 }
コード例 #15
0
 private void TiGuiExists(Model.PCFinishCheck model)
 {
     if (this.ExistsPrimary(model.PCFinishCheckID))
     {
         //设置KEY值
         string invoiceKind   = this.GetInvoiceKind().ToLower();
         string sequencekey_y = string.Format("{0}-y-{1}", invoiceKind, model.PCFinishCheckDate.Value.Year);
         string sequencekey_m = string.Format("{0}-m-{1}-{2}", invoiceKind, model.PCFinishCheckDate.Value.Year, model.PCFinishCheckDate.Value.Month);
         string sequencekey_d = string.Format("{0}-d-{1}", invoiceKind, model.PCFinishCheckDate.Value.ToString("yyyy-MM-dd"));
         string sequencekey   = string.Format(invoiceKind);
         SequenceManager.Increment(sequencekey_y);
         SequenceManager.Increment(sequencekey_m);
         SequenceManager.Increment(sequencekey_d);
         SequenceManager.Increment(sequencekey);
         model.PCFinishCheckID = this.GetId(model.PCFinishCheckDate.Value);
         TiGuiExists(model);
     }
 }
コード例 #16
0
 private void Validate(Model.PCFinishCheck _pcoc)
 {
     if (string.IsNullOrEmpty(_pcoc.PCFinishCheckID))
     {
         throw new Helper.RequireValueException(Model.PCFinishCheck.PRO_PCFinishCheckID);
     }
     if (string.IsNullOrEmpty(_pcoc.PCFinishCheckDate.ToString()))
     {
         throw new Helper.RequireValueException(Model.PCFinishCheck.PRO_PCFinishCheckDate);
     }
     if (string.IsNullOrEmpty(_pcoc.ProductId))
     {
         throw new Helper.RequireValueException(Model.PCFinishCheck.PRO_ProductId);
     }
     if (string.IsNullOrEmpty(_pcoc.Employee0Id))
     {
         throw new Helper.RequireValueException(Model.PCFinishCheck.PRO_Employee0Id);
     }
 }
コード例 #17
0
        /// <summary>
        /// 複製
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void barButtonItem3_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Model.PCFinishCheck model = new Book.Model.PCFinishCheck();
            model.PCFinishCheckID   = this._PCFCManager.GetId();
            model.PCFinishCheckDate = DateTime.Now.Date;

            model.Employee0      = this._PCFC.Employee0;
            model.Employee1      = this._PCFC.Employee1;
            model.WorkHouse      = this._PCFC.WorkHouse;
            model.IsMuShiJianYan = this._PCFC.IsMuShiJianYan.HasValue ? this._PCFC.IsMuShiJianYan.Value : false;
            model.AnnualRing     = this._PCFC.AnnualRing;
            model.Pihao          = this._PCFC.Pihao;

            model.AttrDZDWQDW       = this._PCFC.AttrDZDWQDW.HasValue ? this._PCFC.AttrDZDWQDW.Value : Def_select;
            model.AttrWXTB          = this._PCFC.AttrWXTB.HasValue ? this._PCFC.AttrWXTB.Value : Def_select;
            model.AttrJWYHWRL       = this._PCFC.AttrJWYHWRL.HasValue ? this._PCFC.AttrJWYHWRL.Value : Def_select;
            model.AttrZMCM          = this._PCFC.AttrZMCM.HasValue ? this._PCFC.AttrZMCM.Value : Def_select;
            model.AttrGZBKYRL       = this._PCFC.AttrGZBKYRL.HasValue ? this._PCFC.AttrGZBKYRL.Value : Def_select;
            model.AttrSLDSFMF       = this._PCFC.AttrSLDSFMF.HasValue ? this._PCFC.AttrSLDSFMF.Value : Def_select;
            model.AttrZZWBXGJ       = this._PCFC.AttrZZWBXGJ.HasValue ? this._PCFC.AttrZZWBXGJ.Value : Def_select;
            model.AttrNHDQSFZQ      = this._PCFC.AttrNHDQSFZQ.HasValue ? this._PCFC.AttrNHDQSFZQ.Value : Def_select;
            model.AttrJPBKGS        = this._PCFC.AttrJPBKGS.HasValue ? this._PCFC.AttrJPBKGS.Value : Def_select;
            model.AttrNHTB          = this._PCFC.AttrNHTB.HasValue ? this._PCFC.AttrNHTB.Value : Def_select;
            model.AttrJPJHZQ        = this._PCFC.AttrJPJHZQ.HasValue ? this._PCFC.AttrJPJHZQ.Value : Def_select;
            model.AttrJSSFZQ        = this._PCFC.AttrJSSFZQ.HasValue ? this._PCFC.AttrJSSFZQ.Value : Def_select;
            model.AttrJPSX          = this._PCFC.AttrJPSX.HasValue ? this._PCFC.AttrJPSX.Value : Def_select;
            model.AttrJDZRFS        = this._PCFC.AttrJDZRFS.HasValue ? this._PCFC.AttrJDZRFS.Value : Def_select;
            model.AttrJJSFTSYH      = this._PCFC.AttrJJSFTSYH.HasValue ? this._PCFC.AttrJJSFTSYH.Value : Def_select;
            model.AttrPKZRFS        = this._PCFC.AttrPKZRFS.HasValue ? this._PCFC.AttrPKZRFS.Value : Def_select;
            model.AttrGX            = this._PCFC.AttrGX.HasValue ? this._PCFC.AttrGX.Value : Def_select;
            model.AttrSLDNHWXTMSFZQ = this._PCFC.AttrSLDNHWXTMSFZQ.HasValue ? this._PCFC.AttrSLDNHWXTMSFZQ.Value : Def_select;
            model.AttrTSL           = this._PCFC.AttrTSL.HasValue ? this._PCFC.AttrTSL.Value : Def_select;
            model.AttrCJBZ          = this._PCFC.AttrCJBZ.HasValue ? this._PCFC.AttrCJBZ.Value : Def_select;
            model.AttrDGBLTest      = this._PCFC.AttrDGBLTest.HasValue ? this._PCFC.AttrDGBLTest.Value : Def_select;

            ListOpticsTest = this._OpticsTestManager.FSelect(this._PCFC.PCFinishCheckID);

            this._PCFC  = model;
            this.action = "insert";
            this.Refresh();
        }
コード例 #18
0
 public bool HasRowsAfter(Model.PCFinishCheck e)
 {
     return(accessor.HasRowsAfter(e));
 }
コード例 #19
0
 public Model.PCFinishCheck GetPrev(Model.PCFinishCheck e)
 {
     return(sqlmapper.QueryForObject <Model.PCFinishCheck>("PCFinishCheck.get_prev", e));
 }
コード例 #20
0
 public Model.PCFinishCheck GetNext(Model.PCFinishCheck e)
 {
     return(sqlmapper.QueryForObject <Model.PCFinishCheck>("PCFinishCheck.get_next", e));
 }
コード例 #21
0
 protected override void MoveFirst()
 {
     this._PCFC = this._PCFCManager.Get(this._PCFCManager.GetFirst() == null ? "" : this._PCFCManager.GetFirst().PCFinishCheckID);
 }
コード例 #22
0
 public bool HasRowsBefore(Model.PCFinishCheck e)
 {
     return(sqlmapper.QueryForObject <bool>("PCFinishCheck.has_rows_before", e));
 }
コード例 #23
0
 public void Update(Model.PCFinishCheck e)
 {
     this.Update <Model.PCFinishCheck>(e);
 }
コード例 #24
0
 public void Insert(Model.PCFinishCheck e)
 {
     this.Insert <Model.PCFinishCheck>(e);
 }
コード例 #25
0
 public Model.PCFinishCheck GetPrev(Model.PCFinishCheck e)
 {
     return(accessor.GetPrev(e));
 }
コード例 #26
0
 public Model.PCFinishCheck GetNext(Model.PCFinishCheck e)
 {
     return(accessor.GetNext(e));
 }
コード例 #27
0
ファイル: DataInputForm.cs プロジェクト: daobataotie/EDNew
        //选择加工单
        private void barPronoteHeader_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm pronoForm = new Book.UI.produceManager.PronoteHeader.ChoosePronoteHeaderDetailsForm(3, true);
            if (pronoForm.ShowDialog(this) == DialogResult.OK)
            {
                Model.PronoteHeader pronoteHeader = pronoForm.SelectItem;
                if (pronoteHeader != null)
                {
                    this.txt_PronoteHeaderId.Text    = pronoteHeader.PronoteHeaderID;
                    this.txt_InvoiceCusId.Text       = pronoteHeader.CustomerInvoiceXOId;
                    this._PCDataInput.ProductId      = pronoteHeader.ProductId;
                    this.txt_ProductName.Text        = pronoteHeader.ProductName;
                    this.txt_Customer.Text           = pronoteHeader.CustomerShortName;
                    this.cob_CheckStandard.EditValue = pronoteHeader.CustomerCheckStandard;

                    //光学机内容拉取该加工单对应的 组装成品检验单的光学测试
                    Model.PCFinishCheck pcFinishCheck = (new BL.PCFinishCheckManager()).SelectByPronoteHeader(pronoteHeader.PronoteHeaderID);
                    if (pcFinishCheck != null)
                    {
                        this.ncc_Tester1.EditValue      = pcFinishCheck.Employee0;
                        this.spe_TestQuantity.EditValue = pcFinishCheck.PCFinishCheckCount;

                        this.sp_OrderQuantity.EditValue = pcFinishCheck.PCFinishCheckInCoiunt;

                        IList <Model.OpticsTest> opticsTestList = new BL.OpticsTestManager().FSelect(pcFinishCheck.PCFinishCheckID);
                        foreach (var opticsTest in opticsTestList)
                        {
                            Model.PCOpticalMachine pCOpticalMachine = new Book.Model.PCOpticalMachine();

                            pCOpticalMachine.NoId = opticsTest.ManualId;

                            pCOpticalMachine.PCOpticalMachineId = Guid.NewGuid().ToString();
                            pCOpticalMachine.LeftA             = Convert.ToDecimal(opticsTest.LattrA);
                            pCOpticalMachine.LeftC             = Convert.ToDecimal(opticsTest.LattrC);
                            pCOpticalMachine.LeftS             = Convert.ToDecimal(opticsTest.LattrS);
                            pCOpticalMachine.LeftLevelNum      = Convert.ToDecimal(opticsTest.LinPSM);
                            pCOpticalMachine.LeftLevelJudge    = opticsTest.LeftLevelJudge;
                            pCOpticalMachine.LeftVerticalNum   = Convert.ToDecimal(opticsTest.LupPSM);
                            pCOpticalMachine.LeftVerticalJudge = opticsTest.LeftVerticalJudge;

                            pCOpticalMachine.RightA             = Convert.ToDecimal(opticsTest.RattrA);
                            pCOpticalMachine.RightC             = Convert.ToDecimal(opticsTest.RattrC);
                            pCOpticalMachine.RightS             = Convert.ToDecimal(opticsTest.RattrS);
                            pCOpticalMachine.RightLevelNum      = Convert.ToDecimal(opticsTest.RinPSM);
                            pCOpticalMachine.RightLevelJudge    = opticsTest.RightLevelJudge;
                            pCOpticalMachine.RightVerticalNum   = Convert.ToDecimal(opticsTest.RupPSM);
                            pCOpticalMachine.RightVerticalJudge = opticsTest.RightVerticalJudge;

                            pCOpticalMachine.Condition = opticsTest.Condition;

                            this._PCDataInput.PCOpticalMachineList.Add(pCOpticalMachine);
                            this.gridControl1.RefreshDataSource();
                        }
                        //if (opticsTest != null)
                        //{
                        //    Model.PCOpticalMachine pCOpticalMachine = new Book.Model.PCOpticalMachine();
                        //    pCOpticalMachine.PCOpticalMachineId = Guid.NewGuid().ToString();
                        //    pCOpticalMachine.LeftA = Convert.ToDecimal(opticsTest.LattrA);
                        //    pCOpticalMachine.LeftC = Convert.ToDecimal(opticsTest.LattrC);
                        //    pCOpticalMachine.LeftS = Convert.ToDecimal(opticsTest.LattrS);
                        //    pCOpticalMachine.LeftLevelNum = Convert.ToDecimal(opticsTest.LinPSM);
                        //    pCOpticalMachine.LeftLevelJudge = opticsTest.LeftLevelJudge;
                        //    pCOpticalMachine.LeftVerticalNum = Convert.ToDecimal(opticsTest.LupPSM);
                        //    pCOpticalMachine.LeftVerticalJudge = opticsTest.LeftVerticalJudge;

                        //    pCOpticalMachine.RightA = Convert.ToDecimal(opticsTest.RattrA);
                        //    pCOpticalMachine.RightC = Convert.ToDecimal(opticsTest.RattrC);
                        //    pCOpticalMachine.RightS = Convert.ToDecimal(opticsTest.RattrS);
                        //    pCOpticalMachine.RightLevelNum = Convert.ToDecimal(opticsTest.RinPSM);
                        //    pCOpticalMachine.RightLevelJudge = opticsTest.RightLevelJudge;
                        //    pCOpticalMachine.RightVerticalNum = Convert.ToDecimal(opticsTest.RupPSM);
                        //    pCOpticalMachine.RightVerticalJudge = opticsTest.RightVerticalJudge;

                        //    this._PCDataInput.PCOpticalMachineList.Add(pCOpticalMachine);
                        //    this.gridControl1.RefreshDataSource();
                        //}
                    }
                }
            }
        }
コード例 #28
0
ファイル: RO.cs プロジェクト: daobataotie/EDERP
        public RO(Model.PCFinishCheck _pcfc)
        {
            InitializeComponent();
            if (_pcfc == null)
            {
                return;
            }
            //CompanyInfo
            this._PCFinishCheckId    = _pcfc.PCFinishCheckID;
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblDataName.Text    = Properties.Resources.PCFinishCheck;
            this.lblPrintDate.Text  += DateTime.Now.ToShortDateString();

            //Details Controls
            this.lblPCFinishCheckID.Text   = _pcfc.PCFinishCheckID;
            this.lblPCFinishCheckDate.Text = _pcfc.PCFinishCheckDate.HasValue ? _pcfc.PCFinishCheckDate.Value.ToShortDateString() : "";
            this.lblProductName.Text       = _pcfc.Product == null ? "" : _pcfc.Product.ToString();
            this.lblBuMen.Text             = _pcfc.WorkHouse == null ? "" : _pcfc.WorkHouse.ToString();
            //this.lblInvoiceCusXOId.Text = _pcfc.InvoiceCusXOId;
            this.lblPCFinishCheckCount.Text = _pcfc.PCFinishCheckCount.ToString();
            //this.lblPCFinishCheckInCoiunt.Text = _pcfc.PCFinishCheckInCoiunt.HasValue ? _pcfc.PCFinishCheckInCoiunt.Value.ToString() : "";
            this.lblPCFinishCheckInCoiunt.Text = (_pcfc.PCFinishCheckInCoiunt.HasValue ? _pcfc.PCFinishCheckInCoiunt.Value.ToString() : "") + Environment.NewLine + Environment.NewLine + (string.IsNullOrEmpty(_pcfc.InvoiceCountNum) ? "" : ("¿Í‘ôÓ††Î“QË㔵Á¿£º" + Environment.NewLine + _pcfc.InvoiceCountNum));

            this.lblPCFinishCheckDesc.Text   = _pcfc.PCFinishCheckDesc;
            this.lblEmployee0.Text           = _pcfc.Employee0 == null ? "" : _pcfc.Employee0.ToString();
            this.lblEmployee1.Text           = _pcfc.Employee1 == null ? "" : _pcfc.Employee1.ToString();
            this.lblCustomerProductName.Text = _pcfc.Product == null ? "" : _pcfc.Product.CustomerProductName;
            this.lblPronoteHeardId.Text      = _pcfc.PronoteHeaderID;
            this.lbl_proudctunit.Text        = _pcfc.ProductUnit == null ? "" : _pcfc.ProductUnit.ToString();
            this.lbl_AnnualRing.Text         = _pcfc.AnnualRing;
            this.checkEdit1.Checked          = _pcfc.IsMuShiJianYan.HasValue ? _pcfc.IsMuShiJianYan.Value : false;
            this.lbl_Pihao.Text = _pcfc.Pihao;

            if (_pcfc.PronoteHeader != null)
            {
                Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(_pcfc.PronoteHeader.InvoiceXOId);
                if (xo != null)
                {
                    this.lbl_TestStandard.Text      = xo.xocustomer.CheckedStandard;
                    this.lbl_CustomerName.Text      = xo.Customer.CustomerFullName;
                    this.lbl_InvoiceXOCustomer.Text = xo.xocustomer.CustomerFullName;
                    this.lbl_JHDate.Text            = xo.InvoiceYjrq.Value.ToString("yyyy-MM-dd");
                    this.lblInvoiceCusXOId.Text     = xo.CustomerInvoiceXOId;
                }
            }

            //details
            this.lblDZDWQDW.Text         = Trans(_pcfc.AttrDZDWQDW);
            this.lblJWYHWRL.Text         = Trans(_pcfc.AttrJWYHWRL);
            this.lblGZBKYRL.Text         = Trans(_pcfc.AttrGZBKYRL);
            this.lblZZWBXGJ.Text         = Trans(_pcfc.AttrZZWBXGJ);
            this.lblJPBKGCS.Text         = Trans(_pcfc.AttrJPBKGS);
            this.lblJPJJHZQ.Text         = Trans(_pcfc.AttrJPJHZQ);
            this.lblJPJSX.Text           = Trans(_pcfc.AttrJPSX);
            this.lblJJSFTSYH.Text        = Trans(_pcfc.AttrJJSFTSYH);
            this.lblGX.Text              = Trans(_pcfc.AttrGX);
            this.lblTSL.Text             = Trans(_pcfc.AttrTSL);
            this.lblCJBZ.Text            = Trans(_pcfc.AttrCJBZ);
            this.lblWXTB.Text            = Trans(_pcfc.AttrWXTB);
            this.lblZMCM.Text            = Trans(_pcfc.AttrZMCM);
            this.lblSLDKSFMF.Text        = Trans(_pcfc.AttrSLDSFMF);
            this.lblNHDQSFZQ.Text        = Trans(_pcfc.AttrNHDQSFZQ);
            this.lblNHTB.Text            = Trans(_pcfc.AttrNHTB);
            this.lblJSSFZQ.Text          = Trans(_pcfc.AttrJSSFZQ);
            this.lblJDZRFS.Text          = Trans(_pcfc.AttrJDZRFS);
            this.lblPKZRFS.Text          = Trans(_pcfc.AttrPKZRFS);
            this.lblSLDNHWXTMTBSFZQ.Text = Trans(_pcfc.AttrSLDNHWXTMSFZQ);
            this.TCAttrDGBLTest.Text     = Trans(_pcfc.AttrDGBLTest);
            this.lblESSSFZH.Text         = Trans(_pcfc.AttrESSSFZH);
            this.lblESSFYGZTZ.Text       = Trans(_pcfc.AttrESSFYGZTZ);

            listOpticsTest = new BL.OpticsTestManager().FSelect(this._PCFinishCheckId);
            if (listOpticsTest != null && listOpticsTest.Count > 0)
            {
                this.xrSubreportGX.ReportSource = new PCPGOnlineCheck.subReportGX("PCFinishCheck");
            }
            else
            {
                this.Detail.Visible = false;
            }
        }
コード例 #29
0
        public RO(Model.PCFinishCheck _pcfc)
        {
            InitializeComponent();
            if (_pcfc == null)
            {
                return;
            }
            //CompanyInfo
            this._PCFinishCheckId    = _pcfc.PCFinishCheckID;
            this.lblCompanyName.Text = BL.Settings.CompanyChineseName;
            this.lblDataName.Text    = Properties.Resources.PCFinishCheck;
            this.lblPrintDate.Text  += DateTime.Now.ToShortDateString();

            //Details Controls
            this.lblPCFinishCheckID.Text       = _pcfc.PCFinishCheckID;
            this.lblPCFinishCheckDate.Text     = _pcfc.PCFinishCheckDate.HasValue ? _pcfc.PCFinishCheckDate.Value.ToShortDateString() : "";
            this.lblProductName.Text           = _pcfc.Product == null ? "" : _pcfc.Product.ToString();
            this.lblBuMen.Text                 = _pcfc.WorkHouse == null ? "" : _pcfc.WorkHouse.ToString();
            this.lblInvoiceCusXOId.Text        = _pcfc.InvoiceCusXOId;
            this.lblPCFinishCheckCount.Text    = _pcfc.PCFinishCheckCount.ToString();
            this.lblPCFinishCheckInCoiunt.Text = _pcfc.PCFinishCheckInCoiunt.HasValue ? _pcfc.PCFinishCheckInCoiunt.Value.ToString() : "";
            this.lblPCFinishCheckDesc.Text     = _pcfc.PCFinishCheckDesc;
            this.lblEmployee0.Text             = _pcfc.Employee0 == null ? "" : _pcfc.Employee0.ToString();
            this.lblEmployee1.Text             = _pcfc.Employee1 == null ? "" : _pcfc.Employee1.ToString();
            this.lblCustomerProductName.Text   = _pcfc.Product == null ? "" : _pcfc.Product.CustomerProductName;
            this.lblPronoteHeardId.Text        = _pcfc.PronoteHeaderID;
            this.lbl_proudctunit.Text          = _pcfc.ProductUnit == null ? "" : _pcfc.ProductUnit.ToString();
            this.lbl_AnnualRing.Text           = _pcfc.AnnualRing;
            if (_pcfc.PronoteHeader != null)
            {
                Model.InvoiceXO xo = new BL.InvoiceXOManager().Get(_pcfc.PronoteHeader.InvoiceXOId);
                this.lbl_TestStandard.Text      = xo.xocustomer.CheckedStandard;
                this.lbl_CustomerName.Text      = xo.Customer.CustomerFullName;
                this.lbl_InvoiceXOCustomer.Text = xo.xocustomer.CustomerFullName;
            }

            //details
            this.lblDZDWQDW.Text         = Trans(_pcfc.AttrDZDWQDW);
            this.lblJWYHWRL.Text         = Trans(_pcfc.AttrJWYHWRL);
            this.lblGZBKYRL.Text         = Trans(_pcfc.AttrGZBKYRL);
            this.lblZZWBXGJ.Text         = Trans(_pcfc.AttrZZWBXGJ);
            this.lblJPBKGCS.Text         = Trans(_pcfc.AttrJPBKGS);
            this.lblJPJJHZQ.Text         = Trans(_pcfc.AttrJPJHZQ);
            this.lblJPJSX.Text           = Trans(_pcfc.AttrJPSX);
            this.lblJJSFTSYH.Text        = Trans(_pcfc.AttrJJSFTSYH);
            this.lblGX.Text              = Trans(_pcfc.AttrGX);
            this.lblTSL.Text             = Trans(_pcfc.AttrTSL);
            this.lblCJBZ.Text            = Trans(_pcfc.AttrCJBZ);
            this.lblWXTB.Text            = Trans(_pcfc.AttrWXTB);
            this.lblZMCM.Text            = Trans(_pcfc.AttrZMCM);
            this.lblSLDKSFMF.Text        = Trans(_pcfc.AttrSLDSFMF);
            this.lblNHDQSFZQ.Text        = Trans(_pcfc.AttrNHDQSFZQ);
            this.lblNHTB.Text            = Trans(_pcfc.AttrNHTB);
            this.lblJSSFZQ.Text          = Trans(_pcfc.AttrJSSFZQ);
            this.lblJDZRFS.Text          = Trans(_pcfc.AttrJDZRFS);
            this.lblPKZRFS.Text          = Trans(_pcfc.AttrPKZRFS);
            this.lblSLDNHWXTMTBSFZQ.Text = Trans(_pcfc.AttrSLDNHWXTMSFZQ);
            this.TCAttrDGBLTest.Text     = Trans(_pcfc.AttrDGBLTest);

            this.xrSubreportGX.ReportSource = new PCPGOnlineCheck.subReportGX("PCFinishCheck");
        }
コード例 #30
0
 public bool HasRowsAfter(Model.PCFinishCheck e)
 {
     return(sqlmapper.QueryForObject <bool>("PCFinishCheck.has_rows_after", e));
 }