Beispiel #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            List <string> chkList = new List <string>();

            for (int i = 0; i < dgvBORList.Rows.Count; i++)
            {
                bool isCellChecked = (bool)dgvBORList.Rows[i].Cells[0].EditedFormattedValue;
                if (isCellChecked)
                {
                    chkList.Add(dgvBORList.Rows[i].Cells[1].Value.ToString());
                }
            }
            if (chkList.Count == 0)
            {
                MessageBox.Show("출력할 바코드를 선택해주세요.");
                return;
            }

            string strChkBarCodes = string.Join(",", chkList);

            BORService  service = new BORService();
            XtraBORList rpt     = new XtraBORList();

            DataTable dt = service.GetBaCodeBORList(strChkBarCodes);

            rpt.Parameters["uName"].Value = LoginInfo.UserInfo.LI_NAME;
            rpt.DataSource = dt;
            rpt.CreateDocument();
            using (ReportPrintTool printTool = new ReportPrintTool(rpt))
            {
                printTool.ShowRibbonPreviewDialog();
            }
        }
Beispiel #2
0
        private void GetBORList()
        {
            BORService service = new BORService();

            //dgvBORList.DataSource = null;
            dgvBORList.DataSource = service.GetBORList();
        }
Beispiel #3
0
 public void Search(object sender, EventArgs e)
 {
     if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
     {
         try
         {
             BORService service = new BORService();
             dgvBORList.DataSource = null;
             dgvBORList.DataSource = service.SearchBOR(txtITEMCODE.Text, cboPROC.Text, txtFacility.Text);
         }
         catch (Exception err)
         {
             this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}");
         }
     }
 }
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                #region BOR등록 & 수정
                if (cboItemCode.Text == "" || cboPROC.Text == "" || cboFacil.Text == "" || txtTime.Text == "" ||
                    txtPrio.Text == "" || cboUseYN.Text == "")
                {
                    MessageBox.Show("필수정보 입력 필요");
                    return;
                }

                BOR_VO vo = new BOR_VO();
                vo.BOR_CODE       = BOR_CODE;
                vo.ITEM_CODE      = cboItemCode.Text;
                vo.BOR_PROCS_CODE = cboPROC.Text;
                vo.FCLTS_CODE     = cboFacil.Text;
                vo.BOR_PROCS_TIME = int.Parse(txtTime.Text);
                vo.BOR_PRIORT     = int.Parse(txtPrio.Text);
                if (int.TryParse(txtLead.Text, out int plzNull1))
                {
                    vo.BOR_PROCS_LEADTIME = plzNull1;
                }
                else
                {
                    vo.BOR_PROCS_LEADTIME = null;
                }
                try
                {
                    vo.BOR_YIELD = Convert.ToDecimal(txtYIELD.Text);
                }
                catch
                {
                    MessageBox.Show("err수율 : 올바른 소수점의 형태가 아닙니다.");
                    return;
                }

                vo.BOR_USE_YN    = cboUseYN.Text;
                vo.BOR_REMARK    = txtREMARK.Text;
                vo.BOR_LAST_MDFR = LoginInfo.UserInfo.LI_ID;
                vo.BOR_LAST_MDFY = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

                BORService service = new BORService();
                Message    msg     = service.SaveBOR(vo, Update);
                if (msg.IsSuccess)
                {
                    MessageBox.Show(msg.ResultMessage);
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                else
                {
                    MessageBox.Show(msg.ResultMessage);
                    return;
                }

                #endregion
            }
            catch (Exception err)
            {
                this.Log.WriteError($"[[RECV {this.Name}]]:{err.Message}");
            }
        }