Пример #1
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.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);
     }
 }