/// <summary> /// Creates a new instance of a BuildingModel object, initializes with specified parameters. /// </summary> /// <param name="property"></param> /// <param name="user"></param> public BuildingModel(Views.Property property, ClaimsPrincipal user) : base(property, user) { this.PropertyTypeId = PropertyTypes.Building; this.BuildingConstructionTypeId = property.BuildingConstructionTypeId; this.BuildingConstructionType = property.BuildingConstructionType; this.BuildingOccupantTypeId = property.BuildingOccupantTypeId; this.BuildingOccupantType = property.BuildingOccupantType; this.BuildingPredominateUseId = property.BuildingPredominateUseId; this.BuildingPredominateUse = property.BuildingPredominateUse; this.BuildingFloorCount = property.BuildingFloorCount; this.BuildingTenancy = property.BuildingTenancy; this.RentableArea = property.RentableArea; var userAgencies = user.GetAgenciesAsNullable(); // The property belongs to the user's agency or sub-agency, so include these properties. // TODO: Shuffle code around so that this can use the user.HasPermission(Permissions.AdminProperties). if (userAgencies.Contains(property.AgencyId) || user.HasClaim(c => c.Value == "admin-properties")) { this.LeaseExpiry = property.LeaseExpiry; this.OccupantName = property.OccupantName; this.TransferLeaseOnSale = property.TransferLeaseOnSale; this.Assessed = property.AssessedBuilding; this.AssessedDate = property.AssessedBuildingDate; } }
public void OpenWindows() { if (LayoutWindow != null) { LayoutWindow.Close(); } LayoutWindow = new Views.Layout(this); this._layoutWindow.layoutVM.Controler.XamlPage = (StackPanel)this.LayoutWindow.FindName("PageLayout"); if (SelectedPage != null) { this._layoutWindow.layoutVM.Controler.XamlPage = Settings.StringToXaml(this.SelectedPage.XamlPageString); } else if (SelectedMenu != null) { this._layoutWindow.layoutVM.Controler.XamlPage = Settings.StringToXaml(this.SelectedMenu.XamlPageString); } (this._layoutWindow.FindName("PageLayoutParent") as Grid).Children.Clear(); (this._layoutWindow.FindName("PageLayoutParent") as Grid).Children.Add(this._layoutWindow.layoutVM.Controler.XamlPage); ControlsWindow = new Views.Controls(this); PropertWindow = new Views.Property(this); if (!LayoutWindow.IsVisible) { LayoutWindow.Show(); } ControlsWindow.Hide(); PropertWindow.Hide(); if (LayoutWindow.IsVisible) { LayoutWindow.Activate(); } }
public ProjectProperty(Views.Property property) { Id = property.Id; PropertyTypeId = property.PropertyTypeId; Name = property.Name; Description = property.Description; ClassificationId = property.ClassificationId; Classification = property.Classification; Agency = property.Agency; AgencyId = property.AgencyId; AgencyCode = property.AgencyCode; SubAgencyCode = property.SubAgencyCode; SubAgency = property.SubAgency; IsSensitive = property.IsSensitive; IsVisibleToOtherAgencies = property.IsVisibleToOtherAgencies; AddressId = property.AddressId; Address = property.Address; AdministrativeArea = property.AdministrativeArea; Province = property.Province; Postal = property.Postal; Location = property.Location; ProjectNumbers = property.ProjectNumbers; Market = property.Market; MarketFiscalYear = property.MarketFiscalYear; NetBook = property.NetBook; NetBookFiscalYear = property.NetBookFiscalYear; AssessedLand = property.AssessedLand; AssessedLandDate = property.AssessedLandDate; AssessedBuilding = property.AssessedBuilding; AssessedBuildingDate = property.AssessedBuildingDate; PID = property.PID; PIN = property.PIN; LandArea = property.LandArea; LandLegalDescription = property.LandLegalDescription; Zoning = property.Zoning; ZoningPotential = property.ZoningPotential; ParcelId = property.ParcelId; BuildingConstructionTypeId = property.BuildingConstructionTypeId; BuildingConstructionType = property.BuildingConstructionType; BuildingFloorCount = property.BuildingFloorCount; BuildingPredominateUseId = property.BuildingPredominateUseId; BuildingPredominateUse = property.BuildingPredominateUse; BuildingTenancy = property.BuildingTenancy; RentableArea = property.RentableArea; BuildingOccupantType = property.BuildingOccupantType; BuildingOccupantTypeId = property.BuildingOccupantTypeId; LeaseExpiry = property.LeaseExpiry; OccupantName = property.OccupantName; TransferLeaseOnSale = property.TransferLeaseOnSale; }
/// <summary> /// Creates a new instance of a PropertyModel object, initializes with specified parameters. /// </summary> /// <param name="property"></param> /// <param name="user"></param> public PropertyModel(Views.Property property, ClaimsPrincipal user) { if (property == null) { throw new ArgumentNullException(nameof(property)); } if (user == null) { throw new ArgumentNullException(nameof(user)); } this.Id = property.Id; this.PropertyTypeId = property.PropertyTypeId; this.ClassificationId = property.ClassificationId; this.Classification = property.Classification; this.IsVisibleToOtherAgencies = property.IsVisibleToOtherAgencies; this.ProjectNumbers = property.ProjectNumbers; this.AddressId = property.AddressId; this.Address = property.Address; this.AdministrativeArea = property.AdministrativeArea; this.Province = property.Province; this.Postal = property.Postal; this.Location = property.Location; this.Boundary = property.Boundary; var userAgencies = user.GetAgenciesAsNullable(); // The property belongs to the user's agency or sub-agency, so include these properties. // TODO: Shuffle code around so that this can use the user.HasPermission(Permissions.AdminProperties). if (userAgencies.Contains(property.AgencyId) || user.HasClaim(c => c.Value == "admin-properties")) { this.Name = property.Name; this.Description = property.Description; this.IsSensitive = property.IsSensitive; this.AgencyId = property.AgencyId; this.AgencyCode = property.AgencyCode; this.Agency = property.Agency; this.SubAgencyCode = property.SubAgencyCode; this.SubAgency = property.SubAgency; this.Market = property.Market; this.MarketFiscalYear = property.MarketFiscalYear; this.NetBook = property.NetBook; this.NetBookFiscalYear = property.NetBookFiscalYear; } }
/// <summary> /// Creates a new instance of a ParcelModel object, initializes with specified parameters. /// </summary> /// <param name="property"></param> /// <param name="user"></param> public ParcelModel(Views.Property property, ClaimsPrincipal user) : base(property, user) { this.PropertyTypeId = property.PropertyTypeId; this.PID = property.PID; this.PIN = property.PIN; this.LandLegalDescription = property.LandLegalDescription; this.LandArea = property.LandArea; var userAgencies = user.GetAgenciesAsNullable(); // The property belongs to the user's agency or sub-agency, so include these properties. // TODO: Shuffle code around so that this can use the user.HasPermission(Permissions.AdminProperties). if (userAgencies.Contains(property.AgencyId) || user.HasClaim(c => c.Value == "admin-properties")) { this.Zoning = property.Zoning; this.ZoningPotential = property.ZoningPotential; this.AssessedLand = property.AssessedLand; this.AssessedLandDate = property.AssessedLandDate; this.AssessedBuilding = property.AssessedBuilding; this.AssessedBuildingDate = property.AssessedBuildingDate; } }