Example #1
0
        private void btnUnlock_Click(object sender, EventArgs e)
        {
            FrmSuperUser loginForm = new FrmSuperUser();

            loginForm.FunctionCode = CommonDefine.SystemFunctionCodeDifine.DinnerUnlock;

            DialogResult dr = loginForm.ShowDialog();

            if (dr == DialogResult.Yes)
            {
                this._dinnerControler.DinnerInAdvanceCompleted();
            }
        }
Example #2
0
        private void Set_Click(object sender, EventArgs e)
        {
            bool isSuccess = true;
            string messageText = string.Empty;
            int qcInterval = 0;
            int machineSpeed = 0;

            if (_projectStatusBase.TextboxQCInterval.Text.Trim() == string.Empty)
            {
                messageText = (CommonDefine.SystemMessageText.MessageText_W_QCIntervalEmpty);
                isSuccess = false;
            }

            if (!int.TryParse(_projectStatusBase.TextboxQCInterval.Text.Trim(), out qcInterval))
            {
                messageText = (CommonDefine.SystemMessageText.MessageText_W_QCIntervalInvalid);
                isSuccess = false;
            }

            if (_projectStatusBase.TextboxSpeed.Text.Trim() == string.Empty)
            {
                messageText = (CommonDefine.SystemMessageText.MessageText_W_SpeedEmpty);
                isSuccess = false;
            }

            if (!int.TryParse(_projectStatusBase.TextboxSpeed.Text.Trim(), out machineSpeed))
            {
                messageText = (CommonDefine.SystemMessageText.MessageText_W_SpeedInvalid);
                isSuccess = false;
            }

            FrmSuperUser loginForm = new FrmSuperUser();

            loginForm.FunctionCode = CommonDefine.SystemFunctionCodeDifine.QC_Speed_Setting;

            DialogResult dr = loginForm.ShowDialog();

            if (dr == DialogResult.Yes)
            {
                if (isSuccess)
                {
                    isSuccess = this._projectProductionRealTimeManager.SetProjectProductSetting(qcInterval, machineSpeed, out messageText);
                }

                if (!isSuccess)
                {
                    this.ShowInformationMessage(messageText);
                }
            }
        }
Example #3
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                if (clbReason.CheckedItems.Count == 0)
                {
                    ShowInformationMessage("請選擇糾數原因。");
                    return;
                }

                BaseModel reason = clbReason.SelectedItem as BaseModel;
                if (reason != null)
                {
                    ProjectCorrectRecord correctRecord = new ProjectCorrectRecord();
                    correctRecord.ctr_iAdjustProdQTY = 0;
                    correctRecord.ctr_cReasonID = reason.Code;
                    correctRecord.ctr_cReason = reason.Description;

                    if (this.txtCorrectQTY.Value == 0)
                    {
                        ShowInformationMessage("糾數數量不能為零,請檢查。");
                        return;
                    }
                    else if (this.txtCorrectQTY.Value > 0)
                    {
                        FrmSuperUser loginForm = new FrmSuperUser();

                        loginForm.FunctionCode = CommonDefine.SystemFunctionCodeDifine.CorrectQty;

                        DialogResult dr= loginForm.ShowDialog();

                        correctRecord.AddUser=loginForm.LoginName;

                        if (dr == DialogResult.Yes)
                        {
                            correctRecord.ctr_iAdjustProdQTY = this.txtCorrectQTY.Value;
                            this.OnCorrectProductionQty(correctRecord);
                        }
                    }
                    else
                    {
                        correctRecord.ctr_iAdjustProdQTY = this.txtCorrectQTY.Value;
                        this.OnCorrectProductionQty(correctRecord);
                    }
                }
            }
            catch (Exception ex)
            {
                ShowErrorMessage(ex);
                //throw;
            }

            this.Close();
        }
Example #4
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            FrmSuperUser loginForm = new FrmSuperUser();

            if (loginForm.ShowDialog() == DialogResult.Yes)
            {
                string strDesc = this.m_Controller.CreateNewRecord();
                if (!string.IsNullOrEmpty(strDesc))
                {
                    this.ShowWarningMessage(strDesc);
                }
            }
        }