private void setTheNewBtn2ProdEvents() { removeClickEvent((Button)btn2); btn2.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { try { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //creates new (act) strippingRecord { int indexFromGrid = mgrid.SelectedRows[0].Index; int stripId = (int)mgrid.Rows[indexFromGrid].Cells[0].Value; ProductFullRow row = productService.getFullistContainerOfProduction(stripId); row.productValidity = true; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.NEW, productService, mainWindow); } if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) //creates new (act) qualRecord { ProductQualityPart row = new ProductQualityPart(); row.productValidity = true; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.NEW, productService, mainWindow); } } catch (ErrorServiceProd k) { errorHandle(k.Message); } catch (Exception k) { errorHandle("Ismeretlen hiba történt (ContrMainProdBtn2) " + k.Message); } } }; }
private void setTheNewBtn3ProdEvents() { removeClickEvent((Button)btn3); btn3.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { try { int indexFromGrid = mgrid.SelectedRows[0].Index; int recIdentif = (int)mgrid.Rows[indexFromGrid].Cells[0].Value; if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) //modify the active qualRec { ProductQualityPart row = productService.getPartContainerOfChosenProductions(recIdentif); productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.MODIFY, productService, mainWindow); } if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //modify the active quantRec { ProductFullRow row = productService.getFullistContainerOfProduction(recIdentif); productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.MODIFY, productService, mainWindow); } } catch (ErrorServiceProd k) { errorHandle(k.Message); } catch (Exception k) { errorHandle("Ismeretlen hiba történt (ContrMainProdBtn3) " + k.Message); } } }; }
private void setTheNewBtn1ProdEvents() { removeClickEvent((Button)btn1); btn1.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { try { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) { int indexFromGrid = mgrid.SelectedRows[0].Index; int recId = (int)mgrid.Rows[indexFromGrid].Cells[0].Value; ProductQualityPart row = productService.getPartContainerOfChosenProductions(recId); row.productValidity = true; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.BRANDNEWSTRIPPING, productService, mainWindow); } if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //normal show details of quantity { //create new ordering record is needed - case of ProdMode StripAct } } catch (ErrorServiceProd k) { errorHandle(k.Message); } catch (Exception k) { errorHandle("Ismeretlen hiba történt (ContrMainProdBtn1) " + k.Message); } } }; }
private void setTheNewBtn5ProdEvents() { removeClickEvent((Button)btn5); btn5.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { try { int indexFromGrid = mgrid.SelectedRows[0].Index; int recIdentif = (int)mgrid.Rows[indexFromGrid].Cells[0].Value; if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct || actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripHis) { ProductFullRow row = productService.getFullistContainerOfProduction(recIdentif); productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.DETAILS, productService, mainWindow); } else if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct || actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiHis) { ProductQualityPart row = productService.getPartContainerOfChosenProductions(recIdentif); productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.DETAILS, productService, mainWindow); } } catch (ErrorServiceProd w) { errorHandle(w.Message); } catch (Exception w) { errorHandle("Ismeretlen hiba történt (ContrMainGrid) " + w.Message); } } }; }
private void initializeProdGridViewEvent() { removeDoubleClickEvent(mgrid); mgrid.DoubleClick += (o, a) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct || actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripHis) { int index = mgrid.SelectedRows[0].Index; List <ProductFullRow> allList = productService.getFullListOfProductions(); ProductFullRow row = allList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.DETAILS, productService, mainWindow); } else if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct || actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiHis) { int index = mgrid.SelectedRows[0].Index; List <ProductQualityPart> partList = productService.getPartListOfProductions(); ProductQualityPart row = partList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.DETAILS, productService, mainWindow); } } }; }
private void setTheNewBtn1ProdEvents() { removeClickEvent((Button)btn1); btn1.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) { int index = mgrid.SelectedRows[0].Index; List <ProductQualityPart> productsPartList = productService.getPartListOfProductions(); ProductQualityPart row = productsPartList[index]; row.productValidity = true; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.BRANDNEWSTRIPPING, productService, mainWindow); } if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //normal show details of quantity { //create new ordering record is needed - case of ProdMode StripAct } } }; }
private void setTheNewBtn3ProdEvents() { removeClickEvent((Button)btn3); btn3.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) //modify the active qualRec { int index = mgrid.SelectedRows[0].Index; List <ProductQualityPart> productsFullList = productService.getPartListOfProductions(); ProductQualityPart row = productsFullList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.MODIFY, productService, mainWindow); } if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //modify the active quantRec { int index = mgrid.SelectedRows[0].Index; List <ProductFullRow> productsFullList = productService.getFullListOfProductions(); ProductFullRow row = productsFullList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.MODIFY, productService, mainWindow); } } }; }
private void setTheNewBtn2ProdEvents() { removeClickEvent((Button)btn2); btn2.Click += (e, a) => { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //creates new (act) strippingRecord { if (mgrid.SelectedRows[0].Index != -1) { int index = mgrid.SelectedRows[0].Index; List <ProductFullRow> productsFullList = productService.getFullListOfProductions(); ProductFullRow row = productsFullList[index]; row.productValidity = true; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.NEW, productService, mainWindow); } } if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) //creates new (act) qualRecord { ProductQualityPart row = new ProductQualityPart(); row.productValidity = true; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.NEW, productService, mainWindow); } }; }
private void setTheNewBtn4ProdEvents() { removeClickEvent((Button)btn4); btn4.Click += (e, a) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiAct) //delete activeQualRec { int index = mgrid.SelectedRows[0].Index; List <ProductQualityPart> productsFullList = productService.getPartListOfProductions(); ProductQualityPart row = productsFullList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.DELETE, productService, mainWindow); } else if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANQualiHis) //react passtiveQualRec { int index = mgrid.SelectedRows[0].Index; List <ProductQualityPart> productsFullList = productService.getPartListOfProductions(); ProductQualityPart row = productsFullList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.UNDELETE, productService, mainWindow); } else if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripAct) //delete activeQuantRec { int index = mgrid.SelectedRows[0].Index; List <ProductFullRow> productsFullList = productService.getFullListOfProductions(); ProductFullRow row = productsFullList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.DELETE, productService, mainWindow); } else if (actServiceForSubEvents == FormMainServiceMode.PRODUCTSMANStripHis) //react passiveQuantRec { int index = mgrid.SelectedRows[0].Index; List <ProductFullRow> productsFullList = productService.getFullListOfProductions(); ProductFullRow row = productsFullList[index]; productsManageWindow = new FormServiceProductsWindow(row, ProductWindowPurpose.UNDELETE, productService, mainWindow); } } }; }