Exemplo n.º 1
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);
     }
 }