예제 #1
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            defineDataTable(ref dt);

            ResetControlValues.ResetControlValue(tableLayoutPanel2);
            ResetControlValues.ResetControlValue(tableLayoutPanel3);
            dgvProductSerial.DataSource = dt;
            dgvDateCode.DataSource      = null;
            splMain.Panel2.Enabled      = false;
            splMain.Panel1Collapsed     = false;
        }
예제 #2
0
 private void Ok_btn_Click(object sender, EventArgs e)
 {
     if (checkdate())
     {
         RateNGVo outvo = new RateNGVo();
         RateNGVo invo  = new RateNGVo
         {
             RatelId   = this.RatelId,
             RateModel = model_cmb.Text,
             RateLine  = line_cmb.Text,
             RateCode  = RateCode_txt.Text,
             RateRatio = Ratio_txt.Text
         };
         try
         {
             if (invo.RatelId > 0)
             {
                 outvo = (RateNGVo)DefaultCbmInvoker.Invoke(new UpdateRateNGCbm(), invo);
             }
             else
             {
                 outvo = (RateNGVo)DefaultCbmInvoker.Invoke(new InsertRateNGCbm(), invo);
             }
         }
         catch (Framework.ApplicationException exception)
         {
             popUpMessage.ApplicationError(exception.GetMessageData(), Text);
             logger.Error(exception.GetMessageData());
             return;
         }
         if (outvo.AffectedCount > 0)
         {
             if (UpdateText_lbl.Text == "Add")
             {
                 messageData = new MessageData("mmci00001", Properties.Resources.mmci00001);
                 popUpMessage.Information(messageData, "Notice");
                 ResetControlValues.ResetControlValue(this);
             }
             else
             {
                 messageData = new MessageData("mmci00002", Properties.Resources.mmci00002);
                 popUpMessage.Information(messageData, "Notice");
                 Close();
             }
         }
     }
 }
예제 #3
0
        private void ReportDownTimeForm_Load(object sender, EventArgs e)
        {
            int usr_cd;

            //Load ComboBox
            ValueObjectList <ModelVo> modelvolist = (ValueObjectList <ModelVo>)DefaultCbmInvoker.Invoke(new GetModelCbm(), new ModelVo());

            model_cmb.DisplayMember = "ModelCode";
            BindingSource b1 = new BindingSource(modelvolist.GetList(), null);

            model_cmb.DataSource = b1;

            ProcessVo processvo = (ProcessVo)DefaultCbmInvoker.Invoke(new GetProcessMasterMntCbm(), new ProcessVo());

            assy_cmb.DisplayMember = "ProcessName";
            BindingSource b2 = new BindingSource(processvo.ProcessListVo, null);

            assy_cmb.DataSource = b2;

            MachineVo machinevo = (MachineVo)DefaultCbmInvoker.Invoke(new GetMachineMasterMntCbm(), new MachineVo());

            machine_cmb.DisplayMember = "MachineName";
            BindingSource b4 = new BindingSource(machinevo.MachineListVo, null);

            machine_cmb.DataSource = b4;

            ResetControlValues.ResetControlValue(Search_tbpnl);

            //Check Permission
            ReportDownTimeVo inVo = new ReportDownTimeVo
            {
                RegistrationUserCode = UserData.GetUserData().UserCode
            };

            ReportDownTimeVo usrvo = (ReportDownTimeVo)DefaultCbmInvoker.Invoke(new CheckPermissionCbm(), new ReportDownTimeVo {
                RegistrationUserCode = inVo.RegistrationUserCode
            });

            usr_cd = usrvo.AffectedCount;
            if (usr_cd == 1)
            {
                update_btn.Enabled = true;
                Delete_btn.Enabled = true;
            }
        }
예제 #4
0
        private void btnClose_Click(object sender, EventArgs e)
        {
            DataTable dt = new DataTable();

            defineDataTable(ref dt);
            if (res)
            {
                ResetControlValues.ResetControlValue(tableLayoutPanel2);
                ResetControlValues.ResetControlValue(tableLayoutPanel3);
                dgvProductSerial.DataSource = dt;
                dgvDateCode.DataSource      = null;
                //dgvProductSerial.Rows.Clear();
                //btnDeleteAll.PerformClick();
                txtLimit.Text           = "350";
                splMain.Panel2.Enabled  = false;
                splMain.Panel1Collapsed = false;
                GA1ModelVo getList = (GA1ModelVo)DefaultCbmInvoker.Invoke(new SearchBoxIDCbm(), new GA1ModelVo
                {
                    PrintDate = DateTime.Today,
                    Format    = true
                });
                dgvBoxId.DataSource = getList.dt;
            }
            else
            {
                ResetControlValues.ResetControlValue(tableLayoutPanel2);
                ResetControlValues.ResetControlValue(tableLayoutPanel3);
                //btnDeleteAll.PerformClick();
                //dgvProductSerial.Rows.Clear();
                dgvProductSerial.DataSource = dt;
                dgvDateCode.DataSource      = null;
                txtLimit.Text           = "350";
                splMain.Panel2.Enabled  = false;
                splMain.Panel1Collapsed = false;
                GA1ModelVo getList = (GA1ModelVo)DefaultCbmInvoker.Invoke(new SearchBoxIDCbm(), new GA1ModelVo
                {
                    PrintDate = DateTime.Today,
                    Format    = true
                });
                dgvBoxId.DataSource = getList.dt;
            }
        }
예제 #5
0
        private void ok_btn_Click(object sender, EventArgs e)
        {
            if (checkdata())
            {
                ReportDownTimeVo outVo = new ReportDownTimeVo();
                ReportDownTimeVo inVo  = new ReportDownTimeVo
                {
                    DowntimeReportId        = this.reportDownTimeVo.DowntimeReportId,
                    TimeFrom                = this.timefrom_dtp.Value,
                    TimeTo                  = this.timeto_dtp.Value,
                    Remakes                 = this.remake_txt.Text,
                    LineId                  = ((LineVo)this.line_cmb.SelectedItem).LineId,
                    MachineCode             = this.machine_txt.Text,
                    ModelId                 = ((ModelVo)this.model_cmb.SelectedItem).ModelId,
                    ProcessCode             = this.assy_txt.Text,
                    ProcessWorkId           = ((ProcessWorkVo)this.process_cmb.SelectedItem).ProcessWorkId,
                    ProductionWorkContentId = ((ProdutionWorkContentVo)this.action_cmb.SelectedItem).ProdutionWorkContentId,
                    DefectiveReasonId       = ((DefectiveReasonVo)this.cause_cmb.SelectedItem).DefectiveReasonId,
                    RegistrationUserCode    = User_txt.Text, //UserData.GetUserData().UserName,
                    FactoryCode             = UserData.GetUserData().FactoryCode
                };
                try
                {
                    if (inVo.DowntimeReportId > 0)
                    {
                        outVo = (ReportDownTimeVo)DefaultCbmInvoker.Invoke(new UpdateReportDownTimeCbm(), inVo);
                    }
                    else
                    {
                        outVo = (ReportDownTimeVo)DefaultCbmInvoker.Invoke(new AddReportDownTimeCbm(), inVo);
                    }

                    ResetControlValues.ResetControlValue(tableLayoutPanel1);
                }
                catch (Framework.ApplicationException exception)
                {
                    popUpMessage.ApplicationError(exception.GetMessageData(), Text);
                    logger.Error(exception.GetMessageData());
                    return;
                }
            }
        }
예제 #6
0
        private void btnReplace_Click(object sender, EventArgs e)
        {
            if (lblBoxID.Text == "BoxID:")
            {
                return;
            }

            GA1ModelVo getList = (GA1ModelVo)DefaultCbmInvoker.Invoke(new UpdateSerialCbm(), new GA1ModelVo
            {
                ReplaceSerial   = dgvNewSerial["Serial", 0].Value.ToString(),
                LineCode        = dgvNewSerial["Line", 0].Value.ToString(),
                A90ThurstStatus = dgvNewSerial["Thurst", 0].Value.ToString(),
                Thurst_MC       = dgvNewSerial["Thurst_MC", 0].Value.ToString(),
                A90NoiseStatus  = dgvNewSerial["Noise", 0].Value.ToString(),
                Noise_eq_id     = dgvNewSerial["Noise_MC", 0].Value.ToString(),
                Lot             = dgvNewSerial["Lot", 0].Value.ToString(),
                A90Barcode      = txtOldSerial.Text
            });

            ResetControlValues.ResetControlValue(this);
            dgvNewSerial.DataSource = null;
            txtOldSerial.Focus();
        }
예제 #7
0
 private void clear_btn_Click(object sender, EventArgs e)
 {
     reportdowntime_dgv.DataSource = null;
     ResetControlValues.ResetControlValue(Search_tbpnl);
 }