Esempio n. 1
0
        //右键删除
        //private void kryptonDataGridView1_CellMouseDown(object sender, DataGridViewCellMouseEventArgs e)
        //{
        //    if (e.Button == MouseButtons.Left)
        //    {
        //        if (e.RowIndex >= 0)
        //        {
        //            //若行已是选中状态就不再进行设置
        //            if (kryptonDataGridView1.Rows[e.RowIndex].Selected == false)
        //            {
        //                kryptonDataGridView1.ClearSelection();
        //                kryptonDataGridView1.Rows[e.RowIndex].Selected = true;
        //            }
        //            //只选中一行时设置活动单元格
        //            if (kryptonDataGridView1.SelectedRows.Count == 1)
        //            {
        //                kryptonDataGridView1.CurrentCell = kryptonDataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
        //            }
        //            //弹出操作菜单
        //            contextMenuStrip1.Show(MousePosition.X, MousePosition.Y);
        //        }
        //    }
        //}


        //安装点
        private void ktxt_piont_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)13)
            {
                string      lot   = ktxt_lot.Text.Trim();
                string      point = ktxt_piont.Text.Trim();
                ILE.IResult res   = new ILE.LEResult();
                try
                {
                    int id = Convert.ToInt32(lotWIP.id);
                    foreach (string item in pointList)
                    {
                        if (point == item)
                        {
                            res = BLL.WIP.Sumit_FeedMatToStation(id, point, kcb_Station.SelectedValue.ToString(), ktxtOrder.Text, ktxt_emp.Text, lotWIP.lot_qty);
                            Component.Tool.DisplayResult(txt_resgx, res.Result, res.ExtMessage);
                            deWork();
                            DataBind();
                            return;
                        }
                    }
                    ktxt_piont.Text = "";
                    Component.Tool.DisplayResult(txt_resgx, false, "没有安装点[" + point + "]");
                }
                catch (Exception exc)
                {
                    KryptonMessageBox.Show(exc.Message);
                }
            }
        }
Esempio n. 2
0
        public IResult DoWork(IJob jobModel)
        {
            ILE.IResult res = new ILE.LEResult();

            QualityTest sf = new QualityTest(jobModel.Product);

            sf.ShowDialog();
            res.Result = true;                                    //这里说明工步完成了

            jobModel.StepList[jobModel.StepIdx].Completed = true; //当前步骤完成
            jobModel.Result = sf.QltResult;
            //res.ExtMessage = sf.ExtMessage;
            //job.reload_code += "mould/";
            if (sf.QltResult == false)
            {
                jobModel.NGCodes = sf.ng_codes;
            }

            return(res);
        }
Esempio n. 3
0
        public IResult DoWork(IJob job)
        {
            ILE.IResult res = new ILE.LEResult();
            client = new ServiceReference.ServiceClient();

            string ResDispatching = client.RunServerAPI("BLL.Machine", "GetMachineInfo", job.StationCode);

            if (ResDispatching == "")
            {
                res.Result     = false;
                res.ExtMessage = "该工位未绑定设备,无法使用模具";
                return(res);
            }

            B_Machine produc = JsonConvert.DeserializeObject <B_Machine>(ResDispatching);

            SelectionForm sf = new SelectionForm(produc, job.StationCode, job.EmpCode);

            sf.ShowDialog();
            res.Result       = sf.res.Result;
            res.ExtMessage   = sf.res.ExtMessage;
            job.reload_code += "mould/";
            return(res);
        }