コード例 #1
0
 public void Search(object sender, EventArgs e)
 {
     if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
     {
         try
         {
             FactoryService service = new FactoryService();
             dgvFactoryList.DataSource = null;
             dgvFactoryList.DataSource = service.GetSearchFactoryInfo(txtFactoryCode.Text, cboCategory.Text);
         }
         catch (Exception err)
         {
             _logging = new LoggingUtility(this.Name, Level.Info, 30);
         }
     }
 }
コード例 #2
0
 public void Search(object sender, EventArgs e)
 {
     if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
     {
         try
         {
             WorkOrderService service = new WorkOrderService();
             dgvList.DataSource = null;
             dgvList.DataSource = service.SearchMOVELIST((cboWHouse.SelectedValue == null) ? "" : cboWHouse.SelectedValue.ToString(), cboType.Text, txtITEM_CODE.Text);
         }
         catch (Exception err)
         {
             _logging = new LoggingUtility(this.Name, Level.Info, 30);
         }
     }
 }
コード例 #3
0
        public void Delete(object sender, EventArgs e)
        {
            if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
            {
                try
                {
                    dgvFactoryList.EndEdit();
                    StringBuilder sb  = new StringBuilder();
                    int           cnt = 0;
                    //품목 선택후 List를 전달
                    foreach (DataGridViewRow item in dgvFactoryList.Rows)
                    {
                        if (Convert.ToBoolean(item.Cells[0].Value))
                        {
                            sb.Append(item.Cells[3].Value.ToString() + "@");
                            cnt++;
                        }
                    }
                    if (sb.Length < 1)
                    {
                        MessageBox.Show("삭제할 항목을 선택하여 주십시오.");
                        return;
                    }
                    sb.Remove(sb.Length - 1, 1);
                    if (MessageBox.Show($"총 {cnt}개의 항목을 삭제 하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        FactoryService service = new FactoryService();

                        Message msg = service.DeleteFactory("FACTORY", "FAC_CODE", sb);
                        if (msg.IsSuccess)
                        {
                            MessageBox.Show(msg.ResultMessage);
                            GetFactoryInfo();
                        }
                        else
                        {
                            MessageBox.Show(msg.ResultMessage);
                            return;
                        }
                    }
                }
                catch (Exception err)
                {
                    _logging = new LoggingUtility(this.Name, Level.Info, 30);
                }
            }
        }
コード例 #4
0
        public void Search(object sender, EventArgs e)
        {
            try
            {
                string id      = txtID.Text;
                string item    = txtITEM.Text;
                string company = txtCompany.Text;

                SalesEndService service = new SalesEndService();
                dgvSalesEnd.DataSource = null;
                dgvSalesEnd.DataSource = service.SearchSalesEnd(id, item, company);
            }
            catch (Exception err)
            {
                _logging = new LoggingUtility(this.Name, Level.Info, 30);
            }
        }
コード例 #5
0
 public void Insert(object sender, EventArgs e)
 {
     if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
     {
         try
         {
             FrmFactoryPopUp frm = new FrmFactoryPopUp();
             frm.FAC_LAST_MDFR = LoginInfo.UserInfo.LI_ID;
             frm.FAC_LAST_MDFY = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
             frm.ShowDialog();
             if (frm.DialogResult == DialogResult.OK)
             {
                 GetFactoryInfo();
             }
         }
         catch (Exception err)
         {
             _logging = new LoggingUtility(this.Name, Level.Info, 30);
         }
     }
 }
コード例 #6
0
        public void Search(object sender, EventArgs e)
        {
            try
            {
                if (dtpFrom.Value > dtpTo.Value)
                {
                    MessageBox.Show("시작일이 종료일 보다 클 수 없습니다.");
                    return;
                }
                string fromDATE = dtpFrom.Value.ToString("yyyy-MM-dd");
                string fromTO   = dtpTo.Value.ToString("yyyy-MM-dd");

                WorkOrderService service = new WorkOrderService();
                dgvCustomerOrder.DataSource = null;
                dgvCustomerOrder.DataSource = service.SearchOrderState(fromDATE, fromTO, txtITEM_CODE.Text);
            }
            catch (Exception err)
            {
                _logging = new LoggingUtility(this.Name, Level.Info, 30);
            }
        }
コード例 #7
0
 public void Insert(object sender, EventArgs e)
 {
     if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
     {
         try
         {
             FrmFacilityChoice form = new FrmFacilityChoice();
             form.ShowDialog();
             if (form.FacilityAndGroup) //true : 설비군 팝업창 입력
             {
                 FrmFacilityGroupPopUp frm = new FrmFacilityGroupPopUp();
                 frm.FACG_LAST_MDFR = LoginInfo.UserInfo.LI_ID;
                 frm.FACG_LAST_MDFY = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                 frm.ShowDialog();
                 if (frm.DialogResult == DialogResult.OK)
                 {
                     GetFacilityGroupList();
                 }
             }
             else //false : 설비 팝업창 입력
             {
                 FrmFacilityPopUp frm = new FrmFacilityPopUp();
                 frm.FCLTS_LAST_MDFR = LoginInfo.UserInfo.LI_ID;
                 frm.FCLTS_LAST_MDFY = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                 frm.ShowDialog();
                 if (frm.DialogResult == DialogResult.OK)
                 {
                     GetFacilityList();
                 }
             }
         }
         catch (Exception err)
         {
             _logging = new LoggingUtility(this.Name, Level.Info, 30);
         }
     }
 }
コード例 #8
0
        public void Delete(object sender, EventArgs e)
        {
            if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
            {
                try
                {
                    dgvFacilityGroupList.EndEdit();
                    dgvFacilityList.EndEdit();

                    FrmFacilityChoice form = new FrmFacilityChoice();
                    form.ShowDialog();
                    if (form.FacilityAndGroup)
                    {
                        StringBuilder sb  = new StringBuilder();
                        int           cnt = 0;
                        //품목 선택후 List를 전달
                        foreach (DataGridViewRow item in dgvFacilityGroupList.Rows)
                        {
                            if (Convert.ToBoolean(item.Cells[0].Value))
                            {
                                sb.Append(item.Cells[1].Value.ToString() + "@");
                                cnt++;
                            }
                        }
                        if (sb.Length < 1)
                        {
                            MessageBox.Show("삭제할 항목을 선택하여 주십시오.");
                            return;
                        }
                        if (cnt == 2)
                        {
                            MessageBox.Show("설비군 데이터는 하나의 항목씩만 삭제 가능합니다.");
                            return;
                        }
                        sb.Remove(sb.Length - 1, 1);
                        if (MessageBox.Show($"관련된 설비 데이터도 모두 삭제 됩니다. \n 총 {cnt}개의 항목을 삭제 하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes)
                        {
                            FacilityService service = new FacilityService();
                            Message         msg     = service.DeleteFacilityGroup(dgvFacilityGroupList.CurrentRow.Cells[1].Value.ToString());
                            if (msg.IsSuccess)
                            {
                                MessageBox.Show(msg.ResultMessage);
                                GetFacilityGroupList();
                                GetFacilityList();
                            }
                            else
                            {
                                MessageBox.Show(msg.ResultMessage);
                                return;
                            }
                        }
                    }
                    else //설비 삭제
                    {
                        StringBuilder sb  = new StringBuilder();
                        int           cnt = 0;
                        //품목 선택후 List를 전달
                        foreach (DataGridViewRow item in dgvFacilityList.Rows)
                        {
                            if (Convert.ToBoolean(item.Cells[0].Value))
                            {
                                sb.Append(item.Cells[2].Value.ToString() + "@");
                                cnt++;
                            }
                        }
                        if (sb.Length < 1)
                        {
                            MessageBox.Show("삭제할 항목을 선택하여 주십시오.");
                            return;
                        }
                        sb.Remove(sb.Length - 1, 1);
                        if (MessageBox.Show($"총 {cnt}개의 항목을 삭제 하시겠습니까?", "삭제", MessageBoxButtons.YesNo) == DialogResult.Yes)
                        {
                            FactoryService service = new FactoryService();
                            Message        msg     = service.DeleteFactory("FACILITY", "FCLTS_CODE", sb);
                            if (msg.IsSuccess)
                            {
                                MessageBox.Show(msg.ResultMessage);
                                GetFacilityList();
                            }
                            else
                            {
                                MessageBox.Show(msg.ResultMessage);
                                return;
                            }
                        }
                    }
                }
                catch (Exception err)
                {
                    _logging = new LoggingUtility(this.Name, Level.Info, 30);
                }
            }
        }
コード例 #9
0
 public FrmCompanyEndByMonth2()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #10
0
 public FrmFacilityGroupPopUp()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #11
0
 public FrmProductOUTState()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #12
0
 public FrmBOMPopUp()
 {
     InitializeComponent();
     ComboBinding();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #13
0
 public void Update(object sender, EventArgs e)
 {
     if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
     {
         try
         {
             //수정 시 여러개의 체크박스를 선택하는것을 막음
             dgvFactoryList.EndEdit();
             string sb  = string.Empty;
             int    cnt = 0;
             //체크가 되었는지 확인
             foreach (DataGridViewRow item in dgvFactoryList.Rows)
             {
                 if (Convert.ToBoolean(item.Cells[0].Value))
                 {
                     sb = item.Cells[3].Value.ToString();
                     cnt++;
                 }
             }
             if (cnt == 1) //하나일 경우 PopUp창 띄움
             {
                 FrmFactoryPopUp frm = new FrmFactoryPopUp();
                 frm.Update           = true;
                 frm.FAC_CODE         = dgvFactoryList.CurrentRow.Cells[3].Value.ToString();
                 frm.FAC_FCLTY        = dgvFactoryList.CurrentRow.Cells[1].Value.ToString();
                 frm.FAC_FCLTY_PARENT = dgvFactoryList.CurrentRow.Cells[5].Value.ToString();
                 frm.FAC_NAME         = dgvFactoryList.CurrentRow.Cells[4].Value.ToString();
                 frm.FAC_TYP          = dgvFactoryList.CurrentRow.Cells[2].Value.ToString();
                 frm.FAC_FREE_YN      = dgvFactoryList.CurrentRow.Cells[7].Value.ToString();;
                 if (dgvFactoryList.CurrentRow.Cells[8].Value == null)
                 {
                     frm.FAC_TYP_SORT = null;
                 }
                 else
                 {
                     frm.FAC_TYP_SORT = Convert.ToInt32(dgvFactoryList.CurrentRow.Cells[8].Value);
                 }
                 frm.FAC_DEMAND_YN = dgvFactoryList.CurrentRow.Cells[9].Value.ToString();
                 frm.FAC_PROCS_YN  = dgvFactoryList.CurrentRow.Cells[10].Value.ToString();
                 frm.FAC_MTRL_YN   = dgvFactoryList.CurrentRow.Cells[11].Value.ToString();
                 frm.FAC_LAST_MDFR = LoginInfo.UserInfo.LI_ID;
                 frm.FAC_LAST_MDFY = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                 frm.FAC_USE_YN    = dgvFactoryList.CurrentRow.Cells[13].Value.ToString();
                 frm.FAC_DESC      = dgvFactoryList.CurrentRow.Cells[6].Value.ToString();
                 frm.COM_CODE      = (dgvFactoryList.CurrentRow.Cells[12].Value == null) ? "" : dgvFactoryList.CurrentRow.Cells[12].Value.ToString();
                 frm.ShowDialog();
                 if (frm.DialogResult == DialogResult.OK)
                 {
                     GetFactoryInfo();
                 }
             }
             else
             {
                 MessageBox.Show("하나의 항목씩만 수정 가능");
                 return;
             }
         }
         catch (Exception err)
         {
             _logging = new LoggingUtility(this.Name, Level.Info, 30);
         }
     }
 }
コード例 #14
0
        public void Update(object sender, EventArgs e)
        {
            if (((FrmMAIN)this.MdiParent).ActiveMdiChild == this)
            {
                try
                {
                    dgvFacilityGroupList.EndEdit();
                    dgvFacilityList.EndEdit();

                    FrmFacilityChoice form = new FrmFacilityChoice();
                    form.ShowDialog();
                    if (form.FacilityAndGroup) //설비군 수정
                    {
                        string sb  = string.Empty;
                        int    cnt = 0;
                        foreach (DataGridViewRow item in dgvFacilityGroupList.Rows)
                        {
                            if (Convert.ToBoolean(item.Cells[0].Value))
                            {
                                sb = item.Cells[1].Value.ToString(); //PK = 설비군코드
                                cnt++;
                            }
                        }
                        if (cnt == 1) //하나일 경우 PopUp창 띄움
                        {
                            FrmFacilityGroupPopUp frm = new FrmFacilityGroupPopUp();
                            frm.Update         = true;
                            frm.FACG_CODE      = dgvFacilityGroupList.CurrentRow.Cells[1].Value.ToString();
                            frm.FACG_NAME      = dgvFacilityGroupList.CurrentRow.Cells[2].Value.ToString();
                            frm.FACG_USE_YN    = dgvFacilityGroupList.CurrentRow.Cells[3].Value.ToString();
                            frm.FACG_LAST_MDFR = LoginInfo.UserInfo.LI_ID;
                            frm.FACG_LAST_MDFY = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                            frm.FACG_DESC      = dgvFacilityGroupList.CurrentRow.Cells[6].Value.ToString();
                            frm.ShowDialog();
                            if (frm.DialogResult == DialogResult.OK)
                            {
                                GetFacilityGroupList();
                            }
                        }
                        else
                        {
                            MessageBox.Show("하나의 항복씩만 수정 가능");
                            return;
                        }
                    }
                    else //설비 수정
                    {
                        string sb  = string.Empty;
                        int    cnt = 0;
                        foreach (DataGridViewRow item in dgvFacilityList.Rows)
                        {
                            if (Convert.ToBoolean(item.Cells[0].Value))
                            {
                                sb = item.Cells[2].Value.ToString(); //PK = 설비코드
                                cnt++;
                            }
                        }
                        if (cnt == 1)
                        {
                            FrmFacilityPopUp frm = new FrmFacilityPopUp();
                            frm.Update           = true;
                            frm.FACG_CODE        = dgvFacilityList.CurrentRow.Cells[1].Value.ToString();
                            frm.FCLTS_CODE       = dgvFacilityList.CurrentRow.Cells[2].Value.ToString();
                            frm.FCLTS_NAME       = dgvFacilityList.CurrentRow.Cells[3].Value.ToString();
                            frm.FCLTS_WRHS_EXHST = dgvFacilityList.CurrentRow.Cells[4].Value.ToString();
                            frm.FCLTS_WRHS_GOOD  = dgvFacilityList.CurrentRow.Cells[5].Value.ToString();
                            frm.FCLTS_WRHS_BAD   = dgvFacilityList.CurrentRow.Cells[6].Value.ToString();
                            frm.FCLTS_USE_YN     = dgvFacilityList.CurrentRow.Cells[7].Value.ToString();
                            frm.FCLTS_EXTRL_YN   = dgvFacilityList.CurrentRow.Cells[8].Value.ToString();
                            frm.FCLTS_LAST_MDFR  = dgvFacilityList.CurrentRow.Cells[9].Value.ToString();
                            frm.FCLTS_LAST_MDFY  = dgvFacilityList.CurrentRow.Cells[10].Value.ToString();
                            frm.FCLTS_NOTE       = dgvFacilityList.CurrentRow.Cells[11].Value.ToString();
                            frm.FCLTS_REMARK     = dgvFacilityList.CurrentRow.Cells[12].Value.ToString();
                            frm.ShowDialog();
                            if (frm.DialogResult == DialogResult.OK)
                            {
                                GetFacilityList();
                            }
                        }
                        else
                        {
                            MessageBox.Show("하나의 항복씩만 수정 가능");
                            return;
                        }
                    }
                }
                catch (Exception err)
                {
                    _logging = new LoggingUtility(this.Name, Level.Info, 30);
                }
            }
        }
コード例 #15
0
        private void btnFinalWork_Click(object sender, EventArgs e)
        {
            try
            {
                //수정 시 여러개의 체크박스를 선택하는것을 막음
                dgvMOVEList.EndEdit();
                //string sb = string.Empty;
                int cnt = 0;
                //체크가 되었는지 확인
                foreach (DataGridViewRow item in dgvMOVEList.Rows)
                {
                    if (Convert.ToBoolean(item.Cells[0].Value))
                    {
                        cnt++;
                    }
                }
                if (cnt == 1) //하나일 경우 PopUp창 띄움
                {
                    INSTACK_VO vo = new INSTACK_VO();
                    vo.SALES_WORK_ORDER_ID = dgvMOVEList.CurrentRow.Cells[8].Value.ToString();
                    vo.INS_QTY             = Convert.ToInt32(dgvMOVEList.CurrentRow.Cells[6].Value);
                    vo.ITEM_CODE           = dgvMOVEList.CurrentRow.Cells[1].Value.ToString();

                    if (MessageBox.Show("공정이동 하시겠습니까?", "공정이동", MessageBoxButtons.YesNo) == DialogResult.Yes)
                    {
                        if (dgvMOVEList.CurrentRow.Cells[4].Value.ToString() == "OS")
                        {
                            vo.INS_WRHS = "OS";
                            WorkOrderService service = new WorkOrderService();
                            Message          msg     = service.InsertMoveUpdate(vo);
                            if (msg.IsSuccess)
                            {
                                MessageBox.Show(msg.ResultMessage);
                                GetWorkMOVEInfo();
                            }
                            else
                            {
                                MessageBox.Show(msg.ResultMessage);
                                return;
                            }
                        }
                        else
                        {
                            vo.INS_WRHS = "H_01";
                            WorkOrderService service = new WorkOrderService();
                            Message          msg     = service.InsertMoveUpdate(vo);
                            if (msg.IsSuccess)
                            {
                                MessageBox.Show(msg.ResultMessage);
                                GetWorkMOVEInfo();
                            }
                            else
                            {
                                MessageBox.Show(msg.ResultMessage);
                                return;
                            }
                        }
                    }
                }
                else
                {
                    MessageBox.Show("하나의 항목씩만 공정이동 가능");
                    return;
                }
            }
            catch (Exception err)
            {
                _logging = new LoggingUtility(this.Name, Level.Info, 30);
            }
        }
コード例 #16
0
 public FrmOrderStockState()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #17
0
 public FrmReceivingSearch()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #18
0
 public FrmFactoryManage()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #19
0
 public FrmPROCMoveAndAccum()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #20
0
 public FrmReleaseRequest()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #21
0
 public FrmSalesEndState()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #22
0
 public FrmItem()
 {
     InitializeComponent();
     _logging = new LoggingUtility(this.Name, Level.Info, 30);
 }
コード例 #23
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                #region 설비군 등록&수정

                if (txtFACGCODE.Text == "" || txtFACCODE.Text == "" || txtFACNAME.Text == "" ||
                    cboFACEXHST.Text == "" || cboFACGOOD.Text == "" || cboFACUseYN.Text == "")
                {
                    MessageBox.Show("필수정보 입력 필요");
                    return;
                }

                FACILITY_VO vo = new FACILITY_VO();
                vo.FACG_CODE        = txtFACGCODE.Text;
                vo.FCLTS_CODE       = txtFACCODE.Text;
                vo.FCLTS_NAME       = txtFACNAME.Text;
                vo.FCLTS_WRHS_EXHST = cboFACEXHST.SelectedValue.ToString();
                vo.FCLTS_WRHS_GOOD  = cboFACGOOD.SelectedValue.ToString();
                vo.FCLTS_WRHS_BAD   = (cboFACBAD.SelectedValue == null) ? "" : cboFACBAD.SelectedValue.ToString();
                vo.FCLTS_USE_YN     = cboFACUseYN.Text;
                vo.FCLTS_EXTRL_YN   = cboEXTRLYN.Text;
                vo.FCLTS_LAST_MDFR  = FCLTS_LAST_MDFR;
                vo.FCLTS_LAST_MDFY  = FCLTS_LAST_MDFY;
                vo.FCLTS_NOTE       = txtNote.Text;
                vo.FCLTS_REMARK     = txtREMARK.Text;

                if (!Update) //설비 등록
                {
                    FacilityService service = new FacilityService();
                    Message         msg     = service.InsertFacility(vo, Update);
                    if (msg.IsSuccess)
                    {
                        MessageBox.Show(msg.ResultMessage);
                        this.DialogResult = DialogResult.OK;
                        this.Close();
                    }
                    else
                    {
                        MessageBox.Show(msg.ResultMessage);
                        return;
                    }
                }
                else //설비 수정
                {
                    FacilityService service = new FacilityService();
                    Message         msg     = service.UpdateFacility(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)
            {
                _logging = new LoggingUtility(this.Name, Level.Info, 30);
            }
        }