private void ExecuteConfirm() { try { EditEnabled = false; EnabledCC = false; try { switch (_selectedCommand) { case CommandType.Add: _dbservicewms.AddSKUID(DetailedSKUID.SKUID); SKUIDList.Add(DetailedSKUID); SelectedSKUID = SKUIDList.FirstOrDefault(p => p.ID == DetailedSKUID.ID); _dbservicewms.AddLog(_accessUser, EnumLogWMS.Event, "UI", $"Add SKUID: {DetailedSKUID.SKUID.ToString()}"); break; case CommandType.Edit: _dbservicewms.UpdateSKUID(DetailedSKUID.SKUID); _dbservicewms.AddLog(_accessUser, EnumLogWMS.Event, "UI", $"Edit SKUID: {DetailedSKUID.SKUID.ToString()}"); SelectedSKUID.ID = DetailedSKUID.ID; SelectedSKUID.Description = DetailedSKUID.Description; SelectedSKUID.DefaultQty = DetailedSKUID.DefaultQty; SelectedSKUID.Unit = DetailedSKUID.Unit; SelectedSKUID.Layout = DetailedSKUID.Layout; SelectedSKUID.Capacity = DetailedSKUID.Capacity; SelectedSKUID.Height = DetailedSKUID.Height; SelectedSKUID.Weight = DetailedSKUID.Weight; SelectedSKUID.FrequencyClass = DetailedSKUID.FrequencyClass; break; default: break; } if (DetailedSKUID != null) { DetailedSKUID.ValidationEnabled = false; } } catch (Exception e) { _warehouse.AddEvent(Event.EnumSeverity.Error, Event.EnumType.Exception, e.Message); } } catch (Exception e) { _warehouse.AddEvent(Database.Event.EnumSeverity.Error, Database.Event.EnumType.Exception, string.Format("{0}.{1}: {2}", this.GetType().Name, (new StackTrace()).GetFrame(0).GetMethod().Name, e.Message)); } }