public ServiceProductsWinController(ServiceProducts serviceProd, ProductWindowPurpose actMode, Form prodWin)
 {
     this.productWindow      = prodWin;
     this.typeOfDataManaging = actMode;
     this.serviceProducts    = serviceProd;
     catchTheControls();
 }
 /// <summary>
 /// when this service is loaded in, defines the proper actions
 /// the special events are goint to be redefined
 /// </summary>
 /// <param name="sour">act. rights of the user</param>
 /// <param name="tileProd">the production tile itself</param>
 private void initProductsServBasicEvents(RightLevels rightToManageStore, Control tileProd)
 {
     tileProd.Click += (s, e) =>
     {
         removeDoubleClickEvent(mgrid);
         mgrid.Visible           = true;
         actServiceForSubEvents  = FormMainServiceMode.PRODUCTSMANStripAct;
         productService          = new ServiceProducts(dbci, mainWindow, setOfUserDetails.userId);
         panelOfCommLine.Visible = false;
         if (rightToManageStore == RightLevels.READ)
         {
             actServiceViewStandard = FromMainServiceViewStandard.READ;
             loadAppropriateProductonGridView();
             loadAppropiateProductionCommandLineView();
             initializeProdAlternativeCommandLineEvent();
             initializeProdGridViewEvent();
         }
         else if (rightToManageStore == RightLevels.MODiFY)
         {
             actServiceViewStandard = FromMainServiceViewStandard.OTHER;
             loadAppropriateProductonGridView();
             loadAppropiateProductionCommandLineView();
             initializeProdFullCommandLineEvents();
         }
     };
 }
 public FormServiceProductsWindow(ProductQualityPart prod, ProductWindowPurpose mode,
                                  ServiceProducts serviceOfProd, Form parentMain)
 {
     InitializeComponent();
     this.modeTheWindow       = mode;
     this.parentMainWindow    = parentMain;
     controllerProductsWindow = new ServiceProductsWinController(serviceOfProd, mode, this);
     controllerProductsWindow.sendTheQualityData(prod);
     parentMain.Hide();
     this.Show();
 }
 private int tryParseTemp;   //only for having a type-conversion probe
 /// <summary>
 /// constructor in case of production quantity is the matter
 /// </summary>
 /// <param name="prod">the list element of fullrecord</param>
 /// <param name="mode">mark of mode this section</param>
 /// <param name="serviceOfProd"></param>
 public FormServiceProductsWindow(ProductFullRow prod, ProductWindowPurpose mode,
                                  ServiceProducts serviceOfProd, Form parent)
 {
     InitializeComponent();
     this.modeTheWindow       = mode;
     this.parentMainWindow    = parent;
     controllerProductsWindow = new ServiceProductsWinController(serviceOfProd, mode, this);
     controllerProductsWindow.sendTheStrippingData(prod);
     parent.Hide();
     this.Show();
 }
 /// <summary>
 /// when this service is loaded in, defines the proper actions
 /// the special events are goint to be redefined
 /// </summary>
 /// <param name="sour">act. rights of the user</param>
 /// <param name="tileProd">the production tile itself</param>
 private void initProductsServBasicEvents(RightLevels rightToManageStore, Control tileProd)
 {
     tileProd.Click += (s, e) =>
     {
         actServiceForSubEvents  = FormMainServiceMode.PRODUCTSMANStripAct;
         productService          = new ServiceProducts(dbci, mainWindow, setOfUserDetails.userId);
         panelOfCommLine.Visible = false;
         if (rightToManageStore == RightLevels.READ)
         {
             loadAppropiateProductonGridView();
             initializeProdGridViewEvent();
         }
         else if (rightToManageStore == RightLevels.MODiFY)
         {
             loadAppropiateProductonGridView();
             initializeProdGridViewEvent();
             initializeCommandLineEvents();
             loadAppropiateProductionCommandLineView();
         }
     };
 }