Ejemplo n.º 1
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             /*using (WCFClient wcfClient = new WCFClient())
              * {
              *  wcfClient.Client.CreateNewInterlayer(new DCSBInterlayer()
              *  {
              *      Name = form.ItemName,
              *      Description = ItemDescription,
              *      UnitSystem = (int)UnitsManager.CurrentUnitSystem,
              *      Dimensions = new DCSBDim3D() { M0 = InterlayerLength, M1 = InterlayerWidth, M2 = Thickness },
              *      Weight = Weight,
              *      Color = Color.ToArgb(),
              *      AutoInsert = false
              *  }
              *      );
              * }*/
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 2
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             using (WCFClient wcfClient = new WCFClient())
             {
                 wcfClient.Client.CreateNewPalletCorner(new DCSBPalletCorner()
                 {
                     Name        = form.ItemName,
                     Description = ItemDescription,
                     UnitSystem  = (int)UnitsManager.CurrentUnitSystem,
                     Length      = CornerLength,
                     Width       = CornerWidth,
                     Thickness   = CornerThickness,
                     Weight      = CornerWeight,
                     Color       = CornerColor.ToArgb(),
                     AutoInsert  = false
                 }
                                                        );
             }
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 3
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             /*using (WCFClient wcfClient = new WCFClient())
             {
                 wcfClient.Client.CreateNewTruck(new DCSBTruck()
                 {
                     Name = form.ItemName,
                     Description = ItemDescription,
                     UnitSystem = (int)UnitsManager.CurrentUnitSystem,
                     DimensionsInner = new DCSBDim3D() { M0 = TruckLength, M1 = TruckWidth, M2 = TruckHeight },
                     AdmissibleLoad = TruckAdmissibleLoadWeight,
                     Color = TruckColor.ToArgb(),
                     AutoInsert = false
                 }
                     );
             }*/
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 4
0
 private void onSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             PLMPackServiceClient client = WCFClientSingleton.Instance.Client;
             client.CreateNewCylinder(new DCSBCylinder()
             {
                 Name        = form.ItemName,
                 Description = ItemDescription,
                 UnitSystem  = (int)UnitsManager.CurrentUnitSystem,
                 RadiusOuter = RadiusOuter,
                 RadiusInner = RadiusInner,
                 Height      = CylinderHeight,
                 Weight      = Weight,
                 NetWeight   = this.NetWeight.Activated ? this.NetWeight.Value : new Nullable <double>(),
                 ColorOuter  = ColorWallOuter.ToArgb(),
                 ColorInner  = ColorWallInner.ToArgb(),
                 ColorTop    = ColorTop.ToArgb(),
                 AutoInsert  = false
             }
                                      );
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 5
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             using (WCFClient wcfClient = new WCFClient())
             {
                 wcfClient.Client?.CreateNewPalletFilm(new DCSBPalletFilm()
                 {
                     Name            = form.ItemName,
                     Description     = ItemDescription,
                     UnitSystem      = (int)UnitsManager.CurrentUnitSystem,
                     UseTransparency = this.UseTransparency,
                     UseHatching     = this.UseHatching,
                     HatchingSpace   = HatchSpacing,
                     HatchingAngle   = HatchAngle,
                     Color           = FilmColor.ToArgb(),
                     AutoInsert      = false
                 }
                                                       );
             }
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 6
0
 private void onSendToDB(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             PLMPackServiceClient client = WCFClientSingleton.Instance.Client;
             client.CreateNewPallet(new DCSBPallet()
             {
                 Name        = form.ItemName,
                 Description = ItemDescription,
                 UnitSystem  = (int)UnitsManager.CurrentUnitSystem,
                 PalletType  = PalletTypeName,
                 Dimensions  = new DCSBDim3D()
                 {
                     M0 = PalletLength, M1 = PalletWidth, M2 = PalletHeight
                 },
                 Weight         = Weight,
                 AdmissibleLoad = AdmissibleLoad,
                 Color          = PalletColor.ToArgb(),
                 AutoInsert     = false
             }
                                    );
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 7
0
 private void onSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = BundleName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             PLMPackServiceClient client = WCFClientSingleton.Instance.Client;
             client.CreateNewBundle(new DCSBBundle()
             {
                 Name           = form.ItemName,
                 Description    = Description,
                 UnitSystem     = (int)UnitsManager.CurrentUnitSystem,
                 DimensionsUnit = new DCSBDim3D()
                 {
                     M0 = BundleLength, M1 = BundleWidth, M2 = UnitThickness
                 },
                 Number     = NoFlats,
                 UnitWeight = UnitWeight,
                 Color      = Color.ToArgb(),
                 AutoInsert = false
             }
                                    );
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 8
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             /*using (WCFClient wcfClient = new WCFClient())
              * {
              *  wcfClient.Client.CreateNewPallet(new DCSBPallet()
              *  {
              *      Name = form.ItemName,
              *      Description = ItemDescription,
              *      UnitSystem = (int)UnitsManager.CurrentUnitSystem,
              *      PalletType = PalletTypeName,
              *      Dimensions = new DCSBDim3D() { M0 = PalletLength, M1 = PalletWidth, M2 = PalletHeight },
              *      Weight = Weight,
              *      AdmissibleLoad = AdmissibleLoad,
              *      Color = PalletColor.ToArgb(),
              *      AutoInsert = false
              *  }
              *      );
              * }*/
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 9
0
        private void OnSaveToDatabase(object sender, EventArgs e)
        {
            try
            {
                FormSetItemName form = new FormSetItemName()
                {
                    ItemName = BoxName
                };
                if (DialogResult.OK == form.ShowDialog())
                {
                    using (WCFClient wcfClient = new WCFClient())
                    {
                        // colors
                        int[] colors = new int[6];
                        for (int i = 0; i < 6; ++i)
                        {
                            colors[i] = _faceColors[i].ToArgb();
                        }

                        wcfClient.Client.CreateNewCase(new DCSBCase()
                        {
                            Name            = form.ItemName,
                            Description     = Description,
                            UnitSystem      = (int)UnitsManager.CurrentUnitSystem,
                            IsCase          = (_mode == Mode.MODE_CASE),
                            DimensionsOuter = new DCSBDim3D()
                            {
                                M0 = uCtrlDimensionsOuter.ValueX, M1 = uCtrlDimensionsOuter.ValueY, M2 = uCtrlDimensionsOuter.ValueZ
                            },
                            HasInnerDims    = HasInsideDimensions,
                            DimensionsInner = new DCSBDim3D()
                            {
                                M0 = uCtrlDimensionsInner.X, M1 = uCtrlDimensionsInner.Y, M2 = uCtrlDimensionsInner.Z
                            },
                            ShowTape   = TapeWidth.Activated,
                            TapeWidth  = TapeWidth.Value,
                            TapeColor  = TapeColor.ToArgb(),
                            Weight     = Weight,
                            NetWeight  = !HasInsideDimensions && NetWeight.Activated ? this.NetWeight.Value : new Nullable <double>(),
                            MaxWeight  = HasInsideDimensions && MaxWeight.Activated ? this.MaxWeight.Value : new Nullable <double>(),
                            Colors     = colors,
                            AutoInsert = false
                        }
                                                       );
                    }
                }
            }
            catch (Exception ex)
            {
                _log.Error(ex.Message);
            }
        }
Ejemplo n.º 10
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             using (WCFClient wcfClient = new WCFClient())
             {
                 wcfClient.Client.CreateNewPalletCap(new DCSBPalletCap()
                 {
                     Name            = form.ItemName,
                     Description     = ItemDescription,
                     UnitSystem      = (int)UnitsManager.CurrentUnitSystem,
                     DimensionsOuter = new DCSBDim3D()
                     {
                         M0 = CapLength, M1 = CapWidth, M2 = CapHeight
                     },
                     DimensionsInner = new DCSBDim3D()
                     {
                         M0 = CapInnerLength, M1 = CapInnerWidth, M2 = CapInnerHeight
                     },
                     Weight     = CapWeight,
                     Color      = CapColor.ToArgb(),
                     AutoInsert = false
                 }
                                                     );
             }
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 11
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             /*using (WCFClient wcfClient = new WCFClient())
              * {
              *  wcfClient.Client.CreateNewCylinder(new DCSBCylinder()
              *  {
              *      Name = form.ItemName,
              *      Description = ItemDescription,
              *      UnitSystem = (int)UnitsManager.CurrentUnitSystem,
              *      RadiusOuter = RadiusOuter,
              *      RadiusInner = RadiusInner,
              *      Height = CylinderHeight,
              *      Weight = Weight,
              *      NetWeight = this.NetWeight.Activated ? this.NetWeight.Value : new Nullable<double>(),
              *      ColorOuter = ColorWallOuter.ToArgb(),
              *      ColorInner = ColorWallInner.ToArgb(),
              *      ColorTop = ColorTop.ToArgb(),
              *      AutoInsert = false
              *  }
              *      );
              * }*/
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }
Ejemplo n.º 12
0
 private void OnSendToDatabase(object sender, EventArgs e)
 {
     try
     {
         FormSetItemName form = new FormSetItemName()
         {
             ItemName = ItemName
         };
         if (DialogResult.OK == form.ShowDialog())
         {
             using (WCFClient wcfClient = new WCFClient())
             {
                 wcfClient.Client?.CreateNewCylinder(new DCSBCylinder()
                 {
                     Name        = form.ItemName,
                     Description = ItemDescription,
                     UnitSystem  = (int)UnitsManager.CurrentUnitSystem,
                     RadiusOuter = RadiusOuter,
                     RadiusInner = RadiusInner,
                     Height      = CylinderHeight,
                     Weight      = Weight,
                     NetWeight   = NetWeight.Activated ? NetWeight.Value : new double?(),
                     ColorOuter  = ColorWallOuter.ToArgb(),
                     ColorInner  = ColorWallInner.ToArgb(),
                     ColorTop    = ColorTop.ToArgb(),
                     AutoInsert  = false
                 }
                                                     );
             }
             Close();
         }
     }
     catch (Exception ex)
     {
         _log.Error(ex.Message);
     }
 }