public CRULandLordWindow(LandlordDTO landlord, CRUMode cruMode) { InitializeComponent(); this.Landlord = landlord; if (cruMode == CRUMode.Create) { this.Title = "Create Landlord"; this.CRUButton.Content = "Create"; } else { this.Title = "Update Landlord"; this.CRUButton.Content = "Update"; } }
public CRUPropertyWindow(PropertyDTO propertyDto, CRUMode cruMode) { InitializeComponent(); propertyDTO = propertyDto; if (cruMode == CRUMode.Create) { this.Title = "Create Property"; this.CRUButton.Content = "Create"; } else { this.Title = "Update Property"; this.CRUButton.Content = "Update"; } statusComboBox.ItemsSource = Enum.GetValues(typeof(PropertyStatus)); if (propertyDTO != null) { statusComboBox.SelectedItem = propertyDTO.Status; } }