Beispiel #1
0
        /// <summary>
        /// 弹出待判
        /// </summary>
        /// <param name="job"></param>
        //public void LoadJude(IJob job, int j, Main main)
        //{
        //    if (job.StepList[j].AutoRun != 1)
        //    {
        //        string JudeJson = Tools.ServiceReferenceManager.GetClient().RunServerAPI("BLL.SFC", "GetJudeBySfc", job.SFC);
        //        List<P_SFC_Jude> listJude = JsonConvert.DeserializeObject<List<P_SFC_Jude>>(JudeJson);
        //        if (listJude != null)
        //        {
        //            UserForm.JudePrompt Jude = new UserForm.JudePrompt(job.SFC, listJude);
        //            Jude.ShowDialog();
        //            if (Jude.State == 0)
        //            {
        //                return;
        //            }
        //        }
        //    }
        //}

        /// <summary>
        /// 弹出子工步
        /// </summary>
        /// <param name="step_code"></param>
        /// <param name="job"></param>
        /// <param name="j"></param>
        /// <param name="_main"></param>
        public void LoadSonStep(string step_code, IJob job, int j, Main _main)
        {
            bool   isfedbatch = false;
            string sfc        = "";

            ILE.IResult res = BindSonStep(step_code, job.FlowCode);
            if (res.obj != null)
            {
                List <B_ProcessSonStep> SonStepList = JsonConvert.DeserializeObject <List <B_ProcessSonStep> >(res.obj.ToString());
                if (res.Result)
                {
                    ServiceReference.ServiceClient clien = new ServiceReference.ServiceClient();
                    string             step_name         = clien.RunServerAPI("BLL.Step", "GetStepNmae", step_code + "," + job.Product);
                    ProcessSonStepForm gridform          = new ProcessSonStepForm(SonStepList, job, isfedbatch, sfc, step_name, j, _main);
                    gridform.ShowDialog();
                }
            }
        }
        //双击行事件
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            bool   isFedBatch = true;
            string sfc        = this.textSFC.Text.ToString().Trim().ToUpper();
            string step_code  = this.dataGridView1.SelectedRows[0].Cells["step_code"].Value.ToString();
            string flow_code  = this.dataGridView1.SelectedRows[0].Cells["flow_code"].Value.ToString();

            ILE.IResult res = BindSonStep(step_code, flow_code);
            if (res.obj != null)
            {
                List <B_ProcessSonStep> SonStepList = JsonConvert.DeserializeObject <List <B_ProcessSonStep> >(res.obj.ToString());
                if (res.Result)
                {
                    ServiceReference.ServiceClient clien = new ServiceReference.ServiceClient();
                    string             step_name         = clien.RunServerAPI("BLL_Step", "GetStepNmae", step_code + "," + job.Product);
                    ProcessSonStepForm gridform          = new ProcessSonStepForm(SonStepList, job, isFedBatch, sfc, step_name, 0, main);
                    gridform.ShowDialog();
                }
            }
        }