Ejemplo n.º 1
0
        private void AssignNG()
        {
            string resultMsg = string.Empty;
            string resultID  = string.Empty;

            try
            {
                //CHECK VALIDATION USER
                DialogResult diaResult;
                using (frmCheckUser fCheckUser = new frmCheckUser(this))
                {
                    diaResult = fCheckUser.ShowDialog();
                    resultID  = fCheckUser.USER_ID;
                }

                if (diaResult == DialogResult.OK)
                {
                    base.ShowWaitProcess();
                    resultMsg = ServiceProvider.Instance.Proxy.CheckValidationUser(resultID);
                    base.HideWaitProcess();

                    if (!string.IsNullOrEmpty(resultMsg))
                    {
                        using (frmAssignNG fasNG = new frmAssignNG())
                        {
                            fasNG.JOB_NO       = string.Empty;
                            fasNG.LINE_NO      = -1;
                            fasNG.USER_ID      = resultID;
                            fasNG.IsFinishProd = false;

                            diaResult = fasNG.ShowDialog();
                        }
                    }
                    else
                    {
                        base.ShowErrorBox("User : \"" + resultID + "\"\nAuthentication Fail!!",
                                          "Warning");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void SecondProcess(eProcessMode process)
        {
            string resultMsg = string.Empty;
            string resultID  = string.Empty;

            try
            {
                //CHECK VALIDATION USER
                DialogResult diaResult;
                using (frmCheckUser fCheckUser = new frmCheckUser(this))
                {
                    diaResult = fCheckUser.ShowDialog();
                    resultID  = fCheckUser.USER_ID;
                }

                if (diaResult == DialogResult.OK)
                {
                    base.ShowWaitProcess();
                    resultMsg = ServiceProvider.Instance.Proxy.CheckValidationUser(resultID);
                    base.HideWaitProcess();

                    if (!string.IsNullOrEmpty(resultMsg))
                    {
                        using (frmProcessFinish fProcFinish = new frmProcessFinish())
                        {
                            fProcFinish.USER_ID      = resultID;
                            fProcFinish.PROCESS_MODE = process;
                            fProcFinish.ShowDialog();
                        }
                    }
                    else
                    {
                        MessageBox.Show("User : \"" + resultID + "\"\nAuthentication Fail!!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
                    }
                }
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                MessageBox.Show(ex.Message);
            }
        }
Ejemplo n.º 3
0
        private void QcProcess(eQCStatus status)
        {
            string resultMsg = string.Empty;
            string resultID  = string.Empty;

            try
            {
                //CHECK VALIDATION USER
                DialogResult diaResult;
                using (frmCheckUser fCheckUser = new frmCheckUser(this))
                {
                    diaResult = fCheckUser.ShowDialog();
                    resultID  = fCheckUser.USER_ID;
                }

                if (diaResult == DialogResult.OK)
                {
                    base.ShowWaitProcess();
                    resultMsg = ServiceProvider.Instance.Proxy.CheckValidationUser(resultID);
                    base.HideWaitProcess();

                    if (!string.IsNullOrEmpty(resultMsg))
                    {
                        using (frmOKCargo fQcCheck = new frmOKCargo())
                        {
                            fQcCheck.USER_ID   = resultID;
                            fQcCheck.QC_STATUS = status;
                            fQcCheck.ShowDialog();
                        }
                    }
                    else
                    {
                        MessageBox.Show("User : \"" + resultID + "\"\nAuthentication Fail!!", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
                    }
                }
            }
            catch (Exception ex)
            {
                base.HideWaitProcess();
                MessageBox.Show(ex.Message);
            }
        }