private void frmMain_Load(object sender, EventArgs e) { app = new ApplicationManager(); jobManager = app.JobManager(); theJob = jobManager.OpenJob(jobName); uda_Loop(theJob, ""); //ruleManager = app.RuleManager(); //flowRunner = ruleManager.FlowRunner("PostJobHook", "PostJobHook:Set__Customer"); //flowRunner.AddInterfaceParameter("CurrentJob", theJob); //flowRunner.Run(); //checkStatus(flowRunner, "Job"); ICustomer customer = theJob.Customer(); uda_Loop(customer, customer.Code()); MessageBox.Show(customer.Code().ToString()); //string cust_group = "华为终端"; //string cust_group = getAttr(customer.Code() + "CUSTOMER_ENUM_").ToString(); //ISpecManager specManager = app.SpecManager(); //Array specInfos = specManager.SpecInfos(); //for (int i = 0; i < specInfos.Length; i++) //{ // ISpecInfo specInfo = (ISpecInfo)specInfos.GetValue(i); // if (specInfo.Description().Contains(cust_group)) // { // string[] str = specInfo.Description().Split('\n'); // spec spec = new spec(); // spec.date = Convert.ToDateTime(str[0]); // spec.cust_group = str[1]; // spec.is_new = Convert.ToBoolean(str[2]); // dicSpec.Add(specInfo.Name(), spec); // } //} //foreach (DevExpress.XtraTab.XtraTabPage page in xtraTabControl1.TabPages) //{ // if (cust_group == page.Text && cust_group != "无") // { // page.PageVisible = true; // } //} //if (cust_group == "华为终端") //{ // var dicSort = from objDic in dicSpec orderby objDic.Value.date descending select objDic;//料号按优先级升序排序 // foreach (KeyValuePair<string, spec> kvp in dicSort) // { // if (cmbSpecDate.Properties.Items.Contains(kvp.Value.date.ToShortDateString()) == false) // { // cmbSpecDate.Properties.Items.Add(kvp.Value.date.ToShortDateString()); // } // } // cmbBoard_type.Text = getAttr("BOARD_TYPE_UDA_NEW_", cmbBoard_type).ToString(); //} //else //{ // createInPlan(jobName); // Application.Exit(); //} //string[] str = dicSpec["华为(N21_Ik级)2017-10-24"].Split('\n'); //foreach (string s in str) //{ // MessageBox.Show(s); //} }
private void GetCustomer() { ICustomer customer = theJob.Customer(); customerName = customer.Name(); }