Пример #1
0
 //制程信息改变,对应的工艺参数改变
 private void gridProcess_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
 {
     if (e.Column == colProcessCode)
     {
         if (this.gridProcess.EditingValueModified)
         {
             if (this.gridProdInfo.SelectedRowsCount == 0)
             {
                 ERP_C006_ProcessFlow_Process PF = this.eRPC006ProcessFlowProcessBindingSource.Current as ERP_C006_ProcessFlow_Process;
                 if (PF != null && !string.IsNullOrEmpty(PF.ProcessCode))
                 {
                     PF.ProcessType = codeService.GetList().Where(a => a.CodeID == "PROC" && a.Code == PF.ProcessCode).FirstOrDefault().GroupName;
                     var prodInfos = processProdInfoService.GetQuery().Where(a => a.ProcessCode == PF.ProcessCode).ToList()
                                     .Select(a => new ERP_C006_ProcessFlow_ProdInfo()
                     {
                         PFCode = PF.PFCode, ProcessCode = a.ProcessCode, TechSeqNo = a.TechSeqNo, TechType = a.TechType, IsVisible = a.IsVisible, TechCode = a.TechCode, TechContent = a.TechContent
                     }).ToList();
                     foreach (var prodInfo in prodInfos)
                     {
                         this.eRPC006ProcessFlowProdInfoBindingSource.Add(prodInfo);
                     }
                     eRPC006ProcessFlowProcessBindingSource_CurrentChanged(null, null);
                 }
             }
         }
     }
 }
Пример #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            //RepositoryItemCustomGridLookUpEdit.RegisterCustomGridLookUpEdit();
            // RepositoryItemLookUpEdit
            var userList = codeService.GetList().Select(i => new { i.Code, i.Description, i.CodeID, i.CodeIDDesc }).ToList();

            eRPC001CodeBindingSource1.DataSource = userList;
            comboBoxEdit1.Properties.Items.AddRange(userList.Select(i => i.Description).ToList());
            var dataList = codeService.GetList().Select(i => new InputItem {
                DisPlayName = i.Description, Value = i.Code, InputCode1 = i.CodeIDDesc, InputCode2 = i.CodeID
            }).ToList();

            ERPHelper.Instance.SetGridLookUpEdit(gridLookUpEdit3, dataList, 2);
            gridLookUpEdit3.EditValueChanging += new ChangingEventHandler(gridLookUpEdit3_EditValueChanging);
            add();
            //gridLookUpEdit3.ProcessNewValue += new ProcessNewValueEventHandler(gridLookUpEdit3_ProcessNewValue);
            this.gridLookUpEdit2.Properties.DataSource = dataList;
            gridLookUpEdit2.Properties.DisplayMember   = "DisPlayName";
            gridLookUpEdit2.Properties.ValueMember     = "Code";
            ykGridLookUpEdit3.Properties.DataSource    = userList;
            ykGridLookUpEdit4.Properties.DataSource    = dataList;
        }
Пример #3
0
        private List <string> GetLayType()
        {
            List <string> layoutType = new List <string>();

            switch (layout.FrmType)
            {
            case "Y201_PYieldForm": layoutType = new List <string> {
                    "按产品型号", "按冲床型号", "按生产日期", "按操作员", "按模具"
            };
                break;

            case "Y202_EYieldForm": layoutType = new List <string> {
                    "按产品型号", "按机台", "按生产日期", "按操作员", "按客户"
            };
                break;

            case "MES501JobTxEditForm":
                layoutType = codeService.GetList().Where(a => a.CodeID == "PROC").OrderBy(a => a.Code).Select(a => a.Description).ToList();  //new List<string> { "粗拉", "熔炼","中拉及清洗(酸洗线)", "电镀", "细拉半成品1", "半成品退火", "细拉半成品2", "细拉成品", "成品清洗", "成品退火", "成品绕线", "成品内包" };
                break;
            }
            return(layoutType);
        }
Пример #4
0
 public override void InitData()
 {
     treeCodeType.DataSource = codeService.GetList().Where(a => a.CodeID == "PROC").Select(i => new { i.Code, i.Description }).OrderBy(a => a.Code).ToList();
     this.gridPlan.BestFitColumns();
     //eRPC001CodeBindingSource.DataSource = codeService.GetList();
 }