private void ExecuteEdit() { try { EditEnabled = true; EnabledCC = true; _selectedCommand = CommandType.Edit; _manageSKUID = new SKUIDViewModel { ID = SelectedSKUID.ID, Description = SelectedSKUID.Description, DefaultQty = SelectedSKUID.DefaultQty, Unit = SelectedSKUID.Unit, Layout = SelectedSKUID.Layout, Capacity = SelectedSKUID.Capacity, Height = SelectedSKUID.Height, Weight = SelectedSKUID.Weight, FrequencyClass = SelectedSKUID.FrequencyClass }; _manageSKUID.Initialize(_warehouse); _manageSKUID.ValidationEnabled = true; DetailedSKUID = _manageSKUID; } 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)); } }
private void ExecuteAdd() { try { EditEnabled = true; EnabledCC = true; _selectedCommand = CommandType.Add; _manageSKUID = new SKUIDViewModel { ID = "", Description = "", DefaultQty = 0, Unit = "", Weight = 0, FrequencyClass = 0 }; _manageSKUID.Initialize(_warehouse); _manageSKUID.AllowChangeIndex = true; _manageSKUID.ValidationEnabled = true; DetailedSKUID = _manageSKUID; } 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)); } }