コード例 #1
0
ファイル: DataInputForm.cs プロジェクト: daobataotie/EDNew
 //光学机
 private void btn_PCOpticalMachineADD_Click(object sender, EventArgs e)
 {
     Model.PCOpticalMachine model = new Book.Model.PCOpticalMachine();
     model.PCOpticalMachineId = Guid.NewGuid().ToString();
     this._PCDataInput.PCOpticalMachineList.Add(model);
     this.gridControl1.RefreshDataSource();
 }
コード例 #2
0
ファイル: DataInputForm.cs プロジェクト: daobataotie/EDERP
        //光學機複製
        private void btn_CopyGXJ_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(this.txt_InvoiceCusId.Text))
            {
                MessageBox.Show("客戶訂單號不能為空", "提示", MessageBoxButtons.OK);
                return;
            }

            CopyOpticsTest f = new CopyOpticsTest(this.txt_InvoiceCusId.Text);

            if (f.ShowDialog() == DialogResult.OK && f.List != null && f.List.Count > 0)
            {
                foreach (var item in f.List)
                {
                    Model.PCOpticalMachine model = new Book.Model.PCOpticalMachine();
                    model.PCOpticalMachineId = Guid.NewGuid().ToString();

                    model.LeftA             = Convert.ToDecimal(item.LattrA);
                    model.LeftC             = Convert.ToDecimal(item.LattrC);
                    model.LeftS             = Convert.ToDecimal(item.LattrS);
                    model.LeftLevelNum      = Convert.ToDecimal(item.LinPSM);
                    model.LeftLevelJudge    = item.LeftLevelJudge;
                    model.LeftVerticalNum   = Convert.ToDecimal(item.LupPSM);
                    model.LeftVerticalJudge = item.LeftVerticalJudge;

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

                    model.Condition = item.Condition;
                    model.NoId      = (this._PCDataInput.PCOpticalMachineList.Count + 1).ToString();

                    this._PCDataInput.PCOpticalMachineList.Add(model);
                    this.gridControl1.RefreshDataSource();
                }
            }
        }
コード例 #3
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();
                        //}
                    }
                }
            }
        }