/// <summary> /// Constructor /// </summary> public AddEditSupplierViewModel() { if (SelectedSupplier == null) SelectedSupplier = new DispatchSupplier(); if (Manager == null) Manager = new DispatchSupplierUser(); RegisterCommands(); _countCityControl = 1; EnableDisableSave(false); InitializeCitiesOfServiceControl(); }
public void OpenSelectedProfile(DispatchSupplier supplier) { //SelectedSupplier = supplier; ViewSupplierDetails(null); }
private void FixupSupplier(DispatchSupplier previousValue) { if (IsDeserializing) { return; } if (Supplier != null) { SupplierId = Supplier.Id; } if (ChangeTracker.ChangeTrackingEnabled) { if (ChangeTracker.OriginalValues.ContainsKey("Supplier") && (ChangeTracker.OriginalValues["Supplier"] == Supplier)) { ChangeTracker.OriginalValues.Remove("Supplier"); } else { ChangeTracker.RecordOriginalValue("Supplier", previousValue); } if (Supplier != null && !Supplier.ChangeTracker.ChangeTrackingEnabled) { Supplier.StartTracking(); } } }
public DispatchSupplierValidator(DispatchSupplier dispatchSupplier) { _dispatchSupplier = dispatchSupplier; }
public bool Equals(DispatchSupplier other) { if (ReferenceEquals(null, other)) return false; if (ReferenceEquals(this, other)) return true; if (other.Id == 0 && Id == 0) return false; else return other.Id == Id; }