Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace ProjectTracker.Library.Admin
{
[CslaImplementProperties]
public partial class RoleEdit : BusinessBase<RoleEdit>
public partial class RoleEdit : CslaBaseTypes.BusinessBase<RoleEdit>
{
public RoleEdit()
{
Expand All @@ -19,10 +19,6 @@ public RoleEdit()
[Required]
public partial string Name { get; set; }

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public partial byte[] TimeStamp { get; set; }

protected override void AddBusinessRules()
{
base.AddBusinessRules();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
using System;
using System;
using System.ComponentModel;
using Csla;

namespace ProjectTracker.Library.CslaBaseTypes
{
[Serializable]
public abstract class BusinessBase<T> : Csla.BusinessBase<T> where T : Csla.BusinessBase<T>
{
public static readonly PropertyInfo<byte[]> TimeStampProperty =
RegisterProperty<byte[]>(nameof(TimeStamp));

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
#pragma warning disable CSLA0007 // null-forgiving on GetProperty matches framework convention for non-nullable managed properties
public byte[] TimeStamp
{
get => GetProperty(TimeStampProperty)!;
set => SetProperty(TimeStampProperty, value);
}
#pragma warning restore CSLA0007
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System;
using System.ComponentModel;
using Csla;

namespace ProjectTracker.Library.CslaBaseTypes
{
Expand All @@ -7,6 +9,17 @@ public abstract class BusinessDocumentBase<T, C> : Csla.BusinessDocumentBase<T,
where T : Csla.BusinessDocumentBase<T, C>
where C : notnull, Csla.Core.IEditableBusinessObject
{
public static readonly PropertyInfo<byte[]> TimeStampProperty =
RegisterProperty<byte[]>(nameof(TimeStamp));

[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
#pragma warning disable CSLA0007 // null-forgiving on GetProperty matches framework convention for non-nullable managed properties
public byte[] TimeStamp
{
get => GetProperty(TimeStampProperty)!;
set => SetProperty(TimeStampProperty, value);
}
#pragma warning restore CSLA0007
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ namespace ProjectTracker.Library
[CslaImplementProperties]
public partial class ProjectEdit : CslaBaseTypes.BusinessDocumentBase<ProjectEdit, ProjectResourceEdit>
{
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public partial byte[] TimeStamp { get; private set; }

[Display(Name = "Project id")]
public partial int Id { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,8 @@
namespace ProjectTracker.Library
{
[CslaImplementProperties]
public partial class ProjectResourceEdit : BusinessBase<ProjectResourceEdit>
public partial class ProjectResourceEdit : CslaBaseTypes.BusinessBase<ProjectResourceEdit>
{
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public partial byte[] TimeStamp { get; set; }

[Display(Name = "Resource id")]
public partial int ResourceId { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@
namespace ProjectTracker.Library
{
[CslaImplementProperties]
public partial class ResourceAssignmentEdit : BusinessBase<ResourceAssignmentEdit>
public partial class ResourceAssignmentEdit : CslaBaseTypes.BusinessBase<ResourceAssignmentEdit>
{
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public partial byte[] TimeStamp { get; set; }

[Display(Name = "Project id")]
public partial int ProjectId { get; private set; }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ namespace ProjectTracker.Library
[CslaImplementProperties]
public partial class ResourceEdit : CslaBaseTypes.BusinessDocumentBase<ResourceEdit, ResourceAssignmentEdit>
{
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
public partial byte[] TimeStamp { get; set; }

[Display(Name = "Resource id")]
public partial int Id { get; set; }

Expand Down