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.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); } }