Exemplo n.º 1
0
        protected override void Delete()
        {
            if (this._PCIC == null)
            {
                return;
            }
            if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
            {
                return;
            }
            this._PCICManager.Delete(this._PCIC);

            if (this.sourceInvoice == 0)
            {
                this._PCIC = this._PCICManager.GetNext(this._PCIC);
                if (this._PCIC == null)
                {
                    this._PCIC = this._PCICManager.GetLast();
                }
            }
            else if (this.sourceInvoice == 1)
            {
                this._PCIC = this._PCICManager.PFCGetNext(this._PCIC.InsertTime.Value, this._PCFirstOnlineCheckDetailId);
                if (this._PCIC == null)
                {
                    this._PCIC = this._PCICManager.PFCGetLast(this._PCFirstOnlineCheckDetailId);
                }
            }
        }
Exemplo n.º 2
0
 protected override void MoveLast()
 {
     if (this.LastFlag == 1)
     {
         this.LastFlag = 0; return;
     }
     this._PCIC = this._PCICManager.Get(this._PCICManager.GetLast() == null ? "" : this._PCICManager.GetLast().PCImpactCheckId);
 }
Exemplo n.º 3
0
 protected override void MoveNext()
 {
     Model.PCImpactCheck pcic = this._PCICManager.GetNext(this._PCIC);
     if (pcic == null)
     {
         throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows);
     }
     this._PCIC = this._PCICManager.Get(pcic.PCImpactCheckId);
 }
Exemplo n.º 4
0
 public EditForm(Model.PCImpactCheck mPCIC, string action)
     : this()
 {
     this._PCIC  = mPCIC;
     this.action = action;
     if (this.action == "view")
     {
         LastFlag = 1;
     }
 }
Exemplo n.º 5
0
        public override void Refresh()
        {
            if (this._PCIC == null)
            {
                this.AddNew();
                this.action = "insert";
            }
            else
            {
                if (this.action == "view")
                {
                    this._PCIC = this._PCICManager.GetDetail(this._PCIC.PCImpactCheckId);
                }
            }
            this.txtPCImpactCheckId.Text            = this._PCIC.PCImpactCheckId;
            this.txtInvoiceCusXOId.Text             = this._PCIC.InvoiceCusXOId;
            this.txtPronoteHeaderId.Text            = this._PCIC.PronoteHeaderId;
            this.txtPCImpactCheckDesc.Text          = this._PCIC.PCImpactCheckDesc;
            this.DE_PCImpactCheckDate.EditValue     = this._PCIC.PCImpactCheckDate.Value;
            this.CE_PCImpactCheckQuantity.EditValue = this._PCIC.PCImpactCheckQuantity.HasValue ? this._PCIC.PCImpactCheckQuantity.Value : 0;
            this.BEProduct.EditValue             = this._PCIC.Product;
            this.nccEmployee0.EditValue          = this._PCIC.Employee;
            this.nccWorkHouse.EditValue          = this._PCIC.WorkHouse;
            this.lblDanJuBianHao.Text            = this._PCIC.PCFromType > 0 ? "委外單編號:" : "加工單編號:";
            this.txtCheckStandard.Text           = this._PCIC.mCheckStandard;
            this.calcInvoiceXOQuantity.EditValue = this._PCIC.InvoiceXOQuantity.HasValue ? this._PCIC.InvoiceXOQuantity.Value : 0;

            this.newChooseContorlAuditEmp.EditValue = this._PCIC.AuditEmp;
            this.txt_AuditState.EditValue           = this.GetAuditName(this._PCIC.AuditState);
            this.lookUpEditUnit.EditValue           = this._PCIC.ProductUnitId;

            this.cob_MaterialUnit.Text = this._PCIC.MaterialUnit;

            this.bsPCImpactCheckDetail.DataSource = this._PCIC.Details;

            base.Refresh();
            switch (this.action)
            {
            case "insert":
                this.gridView1.OptionsBehavior.Editable = true;
                break;

            case "update":
                this.gridView1.OptionsBehavior.Editable = true;
                break;

            case "view":
                this.gridView1.OptionsBehavior.Editable = false;
                break;
            }

            this.calcInvoiceXOQuantity.Enabled          = false;
            this.txtPCImpactCheckId.Properties.ReadOnly = true;
            //this.nccEmployee0.Enabled = false;
        }
Exemplo n.º 6
0
 protected override void MoveFirst()
 {
     //this._PCIC = this._PCICManager.Get(this._PCICManager.GetFirst() == null ? "" : this._PCICManager.GetFirst().PCImpactCheckId);
     if (this.sourceInvoice == 0)
     {
         this._PCIC = this._PCICManager.GetFirst();
     }
     else if (this.sourceInvoice == 1)
     {
         this._PCIC = this._PCICManager.PFCGetFirst(this._PCFirstOnlineCheckDetailId);
     }
 }
Exemplo n.º 7
0
 public EditForm(string invoiceId)
     : this()
 {
     this._PCIC = this._PCICManager.Get(invoiceId);
     if (this._PCIC == null)
     {
         throw new ArithmeticException("invoiceid");
     }
     this.action = "view";
     if (this.action == "view")
     {
         LastFlag = 1;
     }
 }
Exemplo n.º 8
0
 public EditForm(Model.PCImpactCheck mPCIC)
     : this()
 {
     if (mPCIC == null)
     {
         throw new ArithmeticException("invoiceid");
     }
     this._PCIC  = mPCIC;
     this.action = "view";
     if (this.action == "view")
     {
         LastFlag = 1;
     }
 }
Exemplo n.º 9
0
        protected override void AddNew()
        {
            this._PCIC = new Book.Model.PCImpactCheck();
            this._PCIC.PCImpactCheckId       = this._PCICManager.GetId();
            this._PCIC.PCImpactCheckDate     = DateTime.Now.Date;
            this._PCIC.PCFromType            = -1;
            this._PCIC.PCImpactCheckQuantity = 1;       //默认抽检数量为1

            //this._PCIC.Employee = BL.V.ActiveOperator.Employee;
            //this._PCIC.EmployeeId = BL.V.ActiveOperator.EmployeeId;

            //初始化一条详细
            this._PCIC.Details = new List <Model.PCImpactCheckDetail>();
            this.AddDataRows();
        }
Exemplo n.º 10
0
        void ROImpactCheck_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            //this.DataSource = manager.PFCSelect(PCFirstOnlineCheckDetailId);   //一般对应一张冲击测试单据

            Model.PCImpactCheck _pcic = manager.PFCGetFirst(PCFirstOnlineCheckDetailId);
            if (_pcic != null)
            {
                _pcic           = manager.GetDetail(_pcic.PCImpactCheckId);
                this.DataSource = _pcic.Details.OrderBy(d => d.attrDate).ToList();
            }
            else
            {
                _pcic           = new Book.Model.PCImpactCheck();
                this.DataSource = new List <Model.PCImpactCheckDetail>();
            }
        }
Exemplo n.º 11
0
        protected override void AddNew()
        {
            this._PCIC = new Book.Model.PCImpactCheck();
            this._PCIC.PCImpactCheckId       = this._PCICManager.GetId();
            this._PCIC.PCImpactCheckDate     = DateTime.Now.Date;
            this._PCIC.PCFromType            = -1;
            this._PCIC.PCImpactCheckQuantity = 6;       //默认抽检数量为6
            this._PCIC.ProductUnitId         = "f7f95879-3444-494b-92eb-2aa784c52e8c";

            //this._PCIC.Employee = BL.V.ActiveOperator.Employee;
            //this._PCIC.EmployeeId = BL.V.ActiveOperator.EmployeeId;

            //初始化一条详细
            this._PCIC.Details = new List <Model.PCImpactCheckDetail>();
            this.AddDataRows();
        }
Exemplo n.º 12
0
        protected override void MoveLast()
        {
            if (this.LastFlag == 1)
            {
                this.LastFlag = 0;
                return;
            }

            if (this.sourceInvoice == 0)
            {
                this._PCIC = this._PCICManager.Get(this._PCICManager.GetLast() == null ? "" : this._PCICManager.GetLast().PCImpactCheckId);
            }
            else if (this.sourceInvoice == 1)
            {
                this._PCIC = this._PCICManager.Get(this._PCICManager.PFCGetLast(this._PCFirstOnlineCheckDetailId) == null ? "" : this._PCICManager.PFCGetLast(this._PCFirstOnlineCheckDetailId).PCImpactCheckId);
            }
        }
Exemplo n.º 13
0
        //选择单据
        private void BarBtn_Search_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            ListForm form = new ListForm();

            if (form.ShowDialog(this) == DialogResult.OK)
            {
                Model.PCImpactCheck currentModel = form.SelectItem as Model.PCImpactCheck;
                if (currentModel != null)
                {
                    this._PCIC = currentModel;
                    this._PCIC = this._PCICManager.GetDetail(this._PCIC.PCImpactCheckId);
                    this.Refresh();
                }
            }
            form.Dispose();
            GC.Collect();
        }
Exemplo n.º 14
0
 protected override void Delete()
 {
     if (this._PCIC == null)
     {
         return;
     }
     if (MessageBox.Show(Properties.Resources.ConfirmToDelete, this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
     {
         return;
     }
     this._PCICManager.Delete(this._PCIC);
     this._PCIC = this._PCICManager.GetNext(this._PCIC);
     if (this._PCIC == null)
     {
         this._PCIC = this._PCICManager.GetLast();
     }
 }
Exemplo n.º 15
0
 //数据验证
 private void Validate(Model.PCImpactCheck pcic)
 {
     if (string.IsNullOrEmpty(pcic.PCImpactCheckId))
     {
         throw new Helper.RequireValueException(Model.PCImpactCheck.PRO_PCImpactCheckId);
     }
     if (string.IsNullOrEmpty(pcic.PCImpactCheckDate.Value.ToString()))
     {
         throw new Helper.RequireValueException(Model.PCImpactCheck.PRO_PCImpactCheckDate);
     }
     //if (string.IsNullOrEmpty(pcic.ProductId))
     //    throw new Helper.RequireValueException(Model.PCImpactCheck.PRO_ProductId);
     if (string.IsNullOrEmpty(pcic.EmployeeId))
     {
         throw new Helper.RequireValueException(Model.PCImpactCheck.PRO_EmployeeId);
     }
 }
Exemplo n.º 16
0
 /// <summary>
 /// Update a PCImpactCheck.
 /// </summary>
 public void Update(Model.PCImpactCheck pCImpactCheck)
 {
     Validate(pCImpactCheck);
     if (pCImpactCheck != null)
     {
         //修改头
         pCImpactCheck.UpdateTime = DateTime.Now;
         accessor.Update(pCImpactCheck);
         //删除详细
         PCImpactCheckDetailAccessor.DeleteByPCImpactCheckId(pCImpactCheck.PCImpactCheckId);
         //添加详细
         foreach (Model.PCImpactCheckDetail details in pCImpactCheck.Details)
         {
             details.PCImpactCheckId = pCImpactCheck.PCImpactCheckId;
             PCImpactCheckDetailAccessor.Insert(details);
         }
     }
 }
Exemplo n.º 17
0
        public void Delete(Model.PCImpactCheck pcic)
        {
            try
            {
                BL.V.BeginTransaction();

                PCImpactCheckDetailAccessor.DeleteByPCImpactCheckId(pcic.PCImpactCheckId);

                this.Delete(pcic.PCImpactCheckId);

                BL.V.CommitTransaction();
            }
            catch
            {
                BL.V.RollbackTransaction();
                throw;
            }
        }
Exemplo n.º 18
0
 private void TiGuiExists(Model.PCImpactCheck model)
 {
     if (this.ExistsPrimary(model.PCImpactCheckId))
     {
         //设置KEY值
         string invoiceKind   = this.GetInvoiceKind().ToLower();
         string sequencekey_y = string.Format("{0}-y-{1}", invoiceKind, model.InsertTime.Value.Year);
         string sequencekey_m = string.Format("{0}-m-{1}-{2}", invoiceKind, model.InsertTime.Value.Year, model.InsertTime.Value.Month);
         string sequencekey_d = string.Format("{0}-d-{1}", invoiceKind, model.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);
         model.PCImpactCheckId = this.GetId(model.InsertTime.Value);
         TiGuiExists(model);
     }
 }
Exemplo n.º 19
0
        protected override void MovePrev()
        {
            Model.PCImpactCheck pcic = null;
            if (this.sourceInvoice == 0)
            {
                pcic = this._PCICManager.GetPrev(this._PCIC);
            }
            else if (this.sourceInvoice == 1)
            {
                pcic = this._PCICManager.PFCGetPrev(this._PCIC.InsertTime.Value, this._PCFirstOnlineCheckDetailId);
            }

            if (pcic == null)
            {
                throw new InvalidOperationException(Properties.Resources.ErrorNoMoreRows);
            }
            this._PCIC = this._PCICManager.Get(pcic.PCImpactCheckId);
        }
Exemplo n.º 20
0
        private void btn_OK_Click(object sender, EventArgs e)
        {
            this.gridView1.PostEditor();
            this.gridView1.UpdateCurrentRow();

            IList <Model.PCImpactCheck> list = this.bindingSource1.DataSource as IList <Model.PCImpactCheck>;

            if (list != null)
            {
                Model.PCImpactCheck pcImapactCheck = list.FirstOrDefault(P => P.IsChecked == true);
                if (pcImapactCheck != null)
                {
                    this.PCImpactCheckId = pcImapactCheck.PCImpactCheckId;
                }
            }

            this.DialogResult = DialogResult.OK;
        }
Exemplo n.º 21
0
        void ROImpactCheck_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            //this.DataSource = manager.PFCSelect(PCFirstOnlineCheckDetailId);   //一般对应一张冲击测试单据

            //ROImpactCheckSub sub = this.ImpackCheckBub.ReportSource as ROImpactCheckSub;
            //sub.PCFirstOnlineCheckDetailId = PCFirstOnlineCheckDetailId;

            //Model.PCImpactCheck _pcic = manager.PFCGetFirst(PCFirstOnlineCheckDetailId);
            if (PCImpactCheck != null)
            {
                PCImpactCheck   = manager.GetDetail(PCImpactCheck.PCImpactCheckId);
                this.DataSource = PCImpactCheck.Details.OrderBy(d => d.attrDate).ToList();
            }
            else
            {
                PCImpactCheck   = new Book.Model.PCImpactCheck();
                this.DataSource = this.DataSource = new List <Model.PCImpactCheckDetail>();
            }
        }
Exemplo n.º 22
0
        /// <summary>
        /// Insert a PCImpactCheck.
        /// </summary>
        public void Insert(Model.PCImpactCheck pCImpactCheck)
        {
            Validate(pCImpactCheck);

            try
            {
                BL.V.BeginTransaction();
                pCImpactCheck.InsertTime = DateTime.Now;
                pCImpactCheck.UpdateTime = DateTime.Now;
                TiGuiExists(pCImpactCheck);

                string invoiceKind   = this.GetInvoiceKind().ToLower();
                string sequencekey_y = string.Format("{0}-y-{1}", invoiceKind, pCImpactCheck.InsertTime.Value.Year);
                string sequencekey_m = string.Format("{0}-m-{1}-{2}", invoiceKind, pCImpactCheck.InsertTime.Value.Year, pCImpactCheck.InsertTime.Value.Month);
                string sequencekey_d = string.Format("{0}-d-{1}", invoiceKind, pCImpactCheck.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(pCImpactCheck);

                foreach (Model.PCImpactCheckDetail pcicDetail in pCImpactCheck.Details)
                {
                    pcicDetail.PCImpactCheckId = pCImpactCheck.PCImpactCheckId;
                    PCICDManager.Insert(pcicDetail);
                }
                BL.V.CommitTransaction();
            }
            catch
            {
                BL.V.RollbackTransaction();
                throw;
            }
        }
Exemplo n.º 23
0
        public override void Refresh()
        {
            if (this._PCIC == null)
            {
                this.AddNew();
                this.action = "insert";
            }
            else
            {
                if (this.action == "view")
                {
                    this._PCIC = this._PCICManager.GetDetail(this._PCIC.PCImpactCheckId);
                }
            }
            this.txtPCImpactCheckId.Text            = this._PCIC.PCImpactCheckId;
            this.txtInvoiceCusXOId.Text             = this._PCIC.InvoiceCusXOId;
            this.txtPronoteHeaderId.Text            = this._PCIC.PronoteHeaderId;
            this.txtPCImpactCheckDesc.Text          = this._PCIC.PCImpactCheckDesc;
            this.DE_PCImpactCheckDate.EditValue     = this._PCIC.PCImpactCheckDate.Value;
            this.CE_PCImpactCheckQuantity.EditValue = this._PCIC.PCImpactCheckQuantity.HasValue ? this._PCIC.PCImpactCheckQuantity.Value : 0;
            this.BEProduct.EditValue             = this._PCIC.Product;
            this.nccEmployee0.EditValue          = this._PCIC.Employee;
            this.nccWorkHouse.EditValue          = this._PCIC.WorkHouse;
            this.lblDanJuBianHao.Text            = this._PCIC.PCFromType > 0 ? "Outsourcing No.:" : "Processing No.:";
            this.txtCheckStandard.Text           = this._PCIC.mCheckStandard;
            this.calcInvoiceXOQuantity.EditValue = this._PCIC.InvoiceXOQuantity.HasValue ? this._PCIC.InvoiceXOQuantity.Value : 0;

            this.newChooseContorlAuditEmp.EditValue = this._PCIC.AuditEmp;
            this.txt_AuditState.EditValue           = this.GetAuditName(this._PCIC.AuditState);
            this.lookUpEditUnit.EditValue           = this._PCIC.ProductUnitId;

            #region LookUpEditor

            DataTable  dt  = new DataTable();
            DataColumn dc  = new DataColumn("id", typeof(string));
            DataColumn dc1 = new DataColumn("name", typeof(string));
            dt.Columns.Add(dc);
            dt.Columns.Add(dc1);
            DataRow dr;
            dr    = dt.NewRow();
            dr[0] = "-1";
            dr[1] = string.Empty;
            dt.Rows.Add(dr);
            dr    = dt.NewRow();
            dr[0] = "0";
            dr[1] = "√";
            dt.Rows.Add(dr);
            dr    = dt.NewRow();
            dr[0] = "1";
            dr[1] = "△";
            dt.Rows.Add(dr);
            dr    = dt.NewRow();
            dr[0] = "2";
            dr[1] = "X";
            dt.Rows.Add(dr);

            for (int i = 0; i < this.gridView1.Columns.Count - 1; i++)
            {
                if (this.gridView1.Columns[i].ColumnEdit is DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit)
                {
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).DataSource = dt;
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).Columns.Clear();
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).Columns.AddRange(new DevExpress.XtraEditors.Controls.LookUpColumnInfo[] {
                        new DevExpress.XtraEditors.Controls.LookUpColumnInfo("name", 25, "Sign"),
                    });
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).DisplayMember = "name";
                    ((DevExpress.XtraEditors.Repository.RepositoryItemLookUpEdit) this.gridView1.Columns[i].ColumnEdit).ValueMember   = "id";
                }
            }

            #endregion
            this.bsPCImpactCheckDetail.DataSource = this._PCIC.Details;

            base.Refresh();
            switch (this.action)
            {
            case "insert":
                this.gridView1.OptionsBehavior.Editable = true;
                break;

            case "update":
                this.gridView1.OptionsBehavior.Editable = true;
                break;

            case "view":
                this.gridView1.OptionsBehavior.Editable = false;
                break;
            }

            this.calcInvoiceXOQuantity.Enabled          = false;
            this.txtPCImpactCheckId.Properties.ReadOnly = true;
            //this.nccEmployee0.Enabled = false;
        }
Exemplo n.º 24
0
 public Model.PCImpactCheck GetNext(Model.PCImpactCheck e)
 {
     return(accessor.GetNext(e));
 }
Exemplo n.º 25
0
        public RO(Model.PCImpactCheck _pcic)
        {
            InitializeComponent();
            if (_pcic == null)
            {
                return;
            }
            this.DataSource = _pcic.Details;

            //CompanyInfo
            this.lblCompanyInfoName.Text = BL.Settings.CompanyChineseName;
            this.lblDataName.Text        = Properties.Resources.PCImpactCheck;
            this.lblPrintDate.Text      += DateTime.Now.ToShortDateString();

            //Control
            this.lblPCImpactCheckId.Text       = _pcic.PCImpactCheckId;
            this.lblPCImpactCheckDate.Text     = _pcic.PCImpactCheckDate.Value.ToShortDateString();
            this.lblInvoiceCusXOId.Text        = _pcic.InvoiceCusXOId;
            this.lblPronoteHeaderId.Text       = _pcic.PronoteHeaderId;
            this.lblPCImpactCheckDesc.Text     = _pcic.PCImpactCheckDesc;
            this.lblPCImpactCheckQuantity.Text = _pcic.PCImpactCheckQuantity.Value.ToString();
            this.lblEmployeeId.Text            = _pcic.Employee == null ? "" : _pcic.Employee.ToString();
            this.lblWorkHouseId.Text           = _pcic.WorkHouse == null ? "" : _pcic.WorkHouse.ToString();
            this.lblProductName.Text           = _pcic.Product == null ? "" : _pcic.Product.ToString();
            this.lblDanJuTest.Text             = _pcic.PCFromType > 0 ? "委外單據編號:" : "加工單據編號:";
            this.lblCheckStandard.Text         = _pcic.mCheckStandard; //质检标准
            this.lblInvoiceXOQuantity.Text     = _pcic.InvoiceXOQuantity.HasValue ? _pcic.InvoiceXOQuantity.Value.ToString() : "";
            this.lbl_ProuductUnit.Text         = _pcic.ProductUnit == null ? "" : _pcic.ProductUnit.ToString();
            //Details
            this.TCattrDate.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrDate, "{0:yyyy-MM-dd}");
            this.TCattrGlassUpL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassUpLDis);
            this.TCattrGlassUpR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassUpRDis);
            this.TCattrGlassDownL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassDownLDis);
            this.TCattrGlassDownR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassDownRDis);
            this.TCattrGlassLeftL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassLeftLDis);
            this.TCattrGlassLeftR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassLeftRDis);
            this.TCattrGlassRightL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassRightLDis);
            this.TCattrGlassRightR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassRightRDis);
            this.TCattrCentralL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrCentralLDis);
            this.TCattrCentralR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrCentralRDis);
            this.TCattrNoseCentral.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrNoseCentralDis);
            this.TCattrGuanZui.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGuanZuiDis);
            this.TCattrJieHenL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrJieHenLDis);
            this.TCattrJieHenR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrJieHenRDis);
            this.TCattrWingL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrWingLDis);
            this.TCattrWingR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrWingRDis);
            this.TCattr_15L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr_15LDis);
            this.TCattr_15R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr_15RDis);
            this.TCattr0L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr0LDis);
            this.TCattr0R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr0RDis);
            this.TCattr15L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr15LDis);
            this.TCattr15R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr15RDis);
            this.TCattr30L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr30LDis);
            this.TCattr30R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr30RDis);
            this.TCattr45L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr45LDis);
            this.TCattr45R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr45RDis);
            this.TCattr60L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr60LDis);
            this.TCattr60R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr60RDis);
            this.TCattr75L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr75LDis);
            this.TCattr75R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr75RDis);
            this.TCattr90L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr90LDis);
            this.TCattr90R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr90RDis);
            this.TCattrFootL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrFootLDis);
            this.TCattrFootR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrFootRDis);
            //this.lblBanbie.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrBanBie);
            this.RT_retest.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrRetest);
        }
Exemplo n.º 26
0
 public Model.PCImpactCheck GetDetail(string pCImpactCheckId)
 {
     Model.PCImpactCheck pcic = accessor.Get(pCImpactCheckId);
     pcic.Details = PCImpactCheckDetailAccessor.Select(pCImpactCheckId);
     return(pcic);
 }
Exemplo n.º 27
0
 public bool PFCHasRowsAfter(Model.PCImpactCheck e, string PCFirstOnlineCheckDetailId)
 {
     return(accessor.PFCHasRowsAfter(e, PCFirstOnlineCheckDetailId));
 }
Exemplo n.º 28
0
 public Model.PCImpactCheck GetPrev(Model.PCImpactCheck e)
 {
     return(accessor.GetPrev(e));
 }
Exemplo n.º 29
0
        public RO(Model.PCImpactCheck _pcic, string RowFilter)
        {
            InitializeComponent();
            if (_pcic == null)
            {
                return;
            }
            try
            {
                DataTable dt = new BL.PCImpactCheckDetailManager().SelectByHeaderId(_pcic.PCImpactCheckId);
                DataView  dv = dt.DefaultView;
                dv.RowFilter    = RowFilter;
                this.DataSource = dv;
            }
            catch
            {
                throw new Helper.MessageValueException("不能以此列作為排序條件打印");
            }

            //CompanyInfo
            this.lblCompanyInfoName.Text = BL.Settings.CompanyChineseName;
            this.lblDataName.Text        = Properties.Resources.PCImpactCheck;
            this.lblPrintDate.Text      += DateTime.Now.ToShortDateString();

            //Control
            this.lblPCImpactCheckId.Text   = _pcic.PCImpactCheckId;
            this.lblPCImpactCheckDate.Text = _pcic.PCImpactCheckDate.Value.ToShortDateString();
            //this.lblInvoiceCusXOId.Text = _pcic.InvoiceCusXOId;
            //this.lblPronoteHeaderId.Text = _pcic.PronoteHeaderId;
            this.lblPCImpactCheckDesc.Text = _pcic.PCImpactCheckDesc;
            //this.lblPCImpactCheckQuantity.Text = _pcic.PCImpactCheckQuantity.Value.ToString();
            this.lblEmployeeId.Text  = _pcic.Employee == null ? "" : _pcic.Employee.ToString();
            this.lblWorkHouseId.Text = _pcic.WorkHouse == null ? "" : _pcic.WorkHouse.ToString();
            //this.lblProductName.Text = _pcic.Product == null ? "" : _pcic.Product.ToString();
            //this.lblDanJuTest.Text = _pcic.PCFromType > 0 ? "委外單據編號:" : "加工單據編號:";
            //this.lblCheckStandard.Text = _pcic.mCheckStandard;      //质检标准
            //this.lblInvoiceXOQuantity.Text = _pcic.InvoiceXOQuantity.HasValue ? _pcic.InvoiceXOQuantity.Value.ToString() : "";
            //this.lbl_ProuductUnit.Text = _pcic.ProductUnit == null ? "" : _pcic.ProductUnit.ToString();
            //Details

            this.TCattrDate.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrDate, "{0:yyyy-MM-dd}");
            this.TCattrBanbie.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrBanBie);
            this.TCattrGlassUpL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassUpLDis);
            this.TCattrGlassUpR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassUpRDis);
            this.TCattrGlassDownL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassDownLDis);
            this.TCattrGlassDownR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassDownRDis);
            this.lblattrGlassLeftL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassLeftLDis);
            this.lblattrGlassLeftR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassLeftRDis);
            this.lblattrGlassRightL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassRightLDis);
            this.lblattrGlassRightR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGlassRightRDis);
            this.lblattrCentralL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrCentralLDis);
            this.lblattrCentralR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrCentralRDis);
            this.TCattrNoseCentral.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrNoseCentralDis);
            this.TCattrGuanZui.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrGuanZuiDis);
            this.lblattr_15L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr_15LDis);
            this.lblattr_15R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr_15RDis);
            this.TCattr0L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr0LDis);
            this.TCattr0R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr0RDis);
            this.TCattr15L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr15LDis);
            this.TCattr15R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr15RDis);
            this.TCattr30L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr30LDis);
            this.TCattr30R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr30RDis);
            this.lblattr45L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr45LDis);
            //this.lblattr45R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr45RDis);
            this.TCattr60L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr60LDis);
            this.TCattr60R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr60RDis);
            this.TCattr75L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr75LDis);
            this.TCattr75R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr75RDis);
            this.TCattr90L.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr90LDis);
            this.TCattr90R.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr90RDis);
            this.lblattr90T.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr90TDis);
            this.lblattr90B.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_Attr90BDis);
            this.TCattrJieHenL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrJieHenLDis);
            this.TCattrJieHenR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrJieHenRDis);
            this.TCattrWingL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrWingLDis);
            this.TCattrWingR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrWingRDis);
            this.TCattrFootL.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrFootLDis);
            //this.TCattrFootR.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_AttrFootRDis);
            //this.lblBanbie.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrBanBie);
            this.RT_retest.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_attrRetest);

            this.TCPronoteHeaderId.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_PronoteHeaderId);
            this.TCProduct.DataBindings.Add("Text", this.DataSource, "Product");
            this.TCUnit.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_ProductUnitId);
            this.TCInvoiceCusID.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_InvoiceCusXOId);
            this.TCCheckStandard.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_mCheckStandard);
            this.TCInvoiceXOQuantity.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_InvoiceXOQuantity);
            this.TCCheckQuantity.DataBindings.Add("Text", this.DataSource, Model.PCImpactCheckDetail.PRO_PCImpactCheckQuantity);
        }
Exemplo n.º 30
0
 protected override void MoveFirst()
 {
     this._PCIC = this._PCICManager.Get(this._PCICManager.GetFirst() == null ? "" : this._PCICManager.GetFirst().PCImpactCheckId);
 }