/// <summary> /// defines the modify the active request /// </summary> private void setTheNewRequEventBtn1() { removeClickEvent((Button)btn1); btn1.Click += (q, w) => { if (mgrid.SelectedRows[0] != null) { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) { int requId = 0; try { int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(requId), RequestWindowPuropse.MorifyTheActive, mainWindow, requestService); } } catch (ErrorServiceRequests e) { errorHandle(e.Message); } catch (Exception e) { errorHandle("Ismeretlen hiba történt (MainContrBtn1) " + e.Message); } } } } }; }
private void initializeRequGridViewEvent() { removeDoubleClickEvent(mgrid); mgrid.DoubleClick += (w, k) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(index), RequestWindowPuropse.DetailsOfActive, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANCalledOff) { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenCalledOffRequest(index), RequestWindowPuropse.DetailsOfCancelled, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANDeleted) { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenDeletedRequest(index), RequestWindowPuropse.DetailsOfDeleted, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANGivenOut) { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenGivenOutRequest(index), RequestWindowPuropse.DetailsOfGivenOut, mainWindow, requestService); } } }; }
/// <summary> /// defines the modify the active request /// </summary> private void setTheNewRequEventBtn1() { removeClickEvent((Button)btn1); btn1.Click += (q, w) => { if (mgrid.SelectedRows[0] != null) { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(index), RequestWindowPuropse.MorifyTheActive, mainWindow, requestService); } } } }; }
/// <summary> /// defines the delet-renew functions on active-deleted requests /// </summary> private void setTheNewRequEventBtn3() { removeClickEvent((Button)btn3); btn3.Click += (d, f) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) //maintain the delete method on an active rec { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(index), RequestWindowPuropse.DeleteTheActive, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANDeleted) //maintain the renew method on deleted ones { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenDeletedRequest(index), RequestWindowPuropse.RenewTheDeleted, mainWindow, requestService); } } }; }
private void setTheNewRequEventBtn2() { removeClickEvent((Button)btn2); btn2.Click += (f, g) => { if (mgrid.SelectedRows[0].Index != -1) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(index), RequestWindowPuropse.GivingOutTheActive, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANGivenOut) //maintain gets back method { int index = mgrid.SelectedRows[0].Index; serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenGivenOutRequest(index), RequestWindowPuropse.GetBackTheGivenOut, mainWindow, requestService); } } }; }
/// <summary> /// defines the delet-renew functions on active-deleted requests /// </summary> private void setTheNewRequEventBtn3() { removeClickEvent((Button)btn3); btn3.Click += (d, f) => { if (mgrid.SelectedRows[0].Index != -1) { int requId = 0; try { int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) //maintain the delete method on an active rec { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(requId), RequestWindowPuropse.DeleteTheActive, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANDeleted) //maintain the renew method on deleted ones { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenDeletedRequest(requId), RequestWindowPuropse.RenewTheDeleted, mainWindow, requestService); } } } catch (ErrorServiceRequests e) { errorHandle(e.Message); } catch (Exception e) { errorHandle("Ismeretlen hiba történt (MainContrBtn3) " + e.Message); } } }; }
private void setTheNewRequEventBtn2() { removeClickEvent((Button)btn2); btn2.Click += (f, g) => { if (mgrid.SelectedRows[0].Index != -1) { int requId = 0; try { int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(requId), RequestWindowPuropse.GivingOutTheActive, mainWindow, requestService); } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANGivenOut) //maintain gets back method { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenGivenOutRequest(requId), RequestWindowPuropse.GetBackTheGivenOut, mainWindow, requestService); } } } catch (ErrorServiceRequests e) { errorHandle(e.Message); } catch (Exception e) { errorHandle("Ismeretlen hiba történt (MainContrBtn2) " + e.Message); } } }; }
/// <summary> /// adjust the GridView event - case of READ permission /// </summary> private void initializeRequGridViewEvent() { mgrid.DoubleClick += (w, k) => { if (mgrid.SelectedRows[0].Index != -1) { try { if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANActive) { int requId = 0; int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenActiveRequest(requId), RequestWindowPuropse.DetailsOfActive, mainWindow, requestService); } } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANCalledOff) { int requId = 0; int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenCalledOffRequest(requId), RequestWindowPuropse.DetailsOfCancelled, mainWindow, requestService); } } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANDeleted) { int requId = 0; int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenDeletedRequest(requId), RequestWindowPuropse.DetailsOfDeleted, mainWindow, requestService); } } else if (actServiceForSubEvents == FormMainServiceMode.REQUESTSMANGivenOut) { int requId = 0; int indexInGrid = mgrid.SelectedRows[0].Index; requId = (int)mgrid.Rows[indexInGrid].Cells[0].Value; if (requId != 0) { serviceRequWindow = new FormServiceRequestsWindow(requestService.getChosenGivenOutRequest(requId), RequestWindowPuropse.DetailsOfGivenOut, mainWindow, requestService); } } } catch (ErrorServiceRequests e) { errorHandle(e.Message); } catch (Exception e) { errorHandle("Ismeretlen hiba történt (ContrMainGrid) " + e.Message); } } }; }