Пример #1
0
        private void btnCreat_Click(object sender, EventArgs e)
        {
            performance_id = int.Parse(lblper.Text);
            common_id      = Convert.ToInt32(cboDef.SelectedValue);
            count          = int.Parse(txtngcount.Text);
            POPService service = new POPService();

            this.Close();
        }
Пример #2
0
        // 서버에 연결하는 코드
        private void ConnectServer()
        {
            POPService service = new POPService();

            client = new POPClient()
            {
                performance_id = this.performance_id
            };
            if (client.Connect())
            {
                client.production_id         = production_id;
                client.performance_qtyimport = Convert.ToInt32(txtcount.Text);
                client.time = service.setTacttime(txtProductID.Text);
                client.Certification();
            }
        }
Пример #3
0
        // 생산을 시작하는 경우
        public void ProduceStart()
        {
            try
            {
                if (production_state == "작업대기")
                {
                    POPService service = new POPService();
                    bool       bresult = service.updatePOP(wo_id, production_id);
                    if (!bresult)
                    {
                        return;
                    }
                    DGV_Binding();
                    changePeriod();
                    //서버와 연결되어있지 않은경우
                    if (!client.Connected)
                    {
                        bool bConnect = client.Connected;

                        if (!bConnect)
                        {
                            MessageBox.Show("서버와 다시 연결합니다");
                            ConnectServer();
                        }
                    }
                    //서버와 연결된 경우 (정상실행)
                    else
                    {
                        MessageBox.Show("서버와 연결되었습니다.");
                        tacttime = service.setTacttime(product_id);
                        GetCount();
                    }
                }
                else
                {
                    MessageBox.Show("작업대기상태인 지시만 실행시켜주세요.");
                }
            }
            catch (Exception ex)
            {
                WriteLog(ex);
            }
        }
Пример #4
0
        public void CompleteProduction()
        {
            //작업지시 , 생산 state > 생산완료
            int pid  = int.Parse(lblProduction.Text);
            int woid = int.Parse(lblwo.Text);

            if (this.btnNg.InvokeRequired)
            {
                btnNg.Invoke(new CrossThreadSafetySetText(ctimerCotrol));
            }
            btnNg.Enabled = true;
            POPService service = new POPService();
            bool       result  = service.ChangeWPState(pid, woid);

            service.CompleteProduction(pid);
            if (result)
            {
                MessageBox.Show("작업완료");
                DGV_Binding();
                changePeriod();
            }
        }
Пример #5
0
        private void DGV_Binding()
        {
            if (this.dgvWaitWork.InvokeRequired && this.dgvWorking.InvokeRequired && this.dgvEndWork.InvokeRequired)
            {
                dgvWaitWork.Invoke(new CrossThreadSafetySetText(DGV_Binding));
                dgvWorking.Invoke(new CrossThreadSafetySetText(DGV_Binding));
                dgvEndWork.Invoke(new CrossThreadSafetySetText(DGV_Binding));
            }
            else
            {
                POPService serviceWa = new POPService();
                waitList = serviceWa.GetWaitPerList();
                dgvWaitWork.DataSource = waitList;

                POPService serviceW = new POPService();
                workList = serviceW.GetWorkPerList();
                dgvWorking.DataSource = workList;

                POPService serviceE = new POPService();
                endList = serviceE.GetEndPerList();
                dgvEndWork.DataSource = endList;
            }
        }
Пример #6
0
        private void btnSignIn_Click(object sender, EventArgs e)
        {
            POPService service = new POPService();

            //로그인 유효성검사 null or 기본값
            if (txtID.Text == null || txtPwd.Text == null || txtID.Text == "UserID" || txtPwd.Text == "PassWord")
            {
                MessageBox.Show(Properties.Resources.msgLoginNull);
            }
            else
            {
                service.Login(int.Parse(txtID.Text), int.Parse(txtPwd.Text));
                if (LoginVO.user.ID != 0)
                {
                    frmPOP frm = new frmPOP();
                    frm.Show();
                }
                else
                {
                    MessageBox.Show(Properties.Resources.msgLoginCheck);
                }
            }
        }