Skip to content

Commit

Permalink
Throw InvalidOperationException inside viewmodels' setters
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-yagodin committed Jul 25, 2016
1 parent a48ef92 commit baa2f4d
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 85 deletions.
12 changes: 6 additions & 6 deletions R7.University.Employee/ViewModels/EmployeeDisciplineViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,37 +39,37 @@ public EmployeeDisciplineViewModel (IEmployeeDiscipline model)
public long EmployeeDisciplineID
{
get { return Model.EmployeeDisciplineID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int EmployeeID
{
get { return Model.EmployeeID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int EduProgramProfileID
{
get { return Model.EduProgramProfileID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Disciplines
{
get { return Model.Disciplines; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public EmployeeInfo Employee
{
get { return Model.Employee; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public EduProgramProfileInfo EduProgramProfile
{
get { return Model.EduProgramProfile; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

#endregion
Expand Down
40 changes: 20 additions & 20 deletions R7.University/ViewModels/EduProgramProfileViewModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,121 +39,121 @@ protected EduProgramProfileViewModelBase (IEduProgramProfile model)
public int EduProgramProfileID
{
get { return Model.EduProgramProfileID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int EduProgramID
{
get { return Model.EduProgramID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int EduLevelId
{
get { return Model.EduLevelId; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int? DivisionId
{
get { return Model.EduLevelId; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string ProfileCode
{
get { return Model.ProfileCode; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string ProfileTitle
{
get { return Model.ProfileTitle; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Languages
{
get { return Model.Languages; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime? AccreditedToDate
{
get { return Model.AccreditedToDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime? CommunityAccreditedToDate
{
get { return Model.CommunityAccreditedToDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime? StartDate
{
get { return Model.StartDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime? EndDate
{
get { return Model.EndDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int LastModifiedByUserID
{
get { return Model.LastModifiedByUserID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime LastModifiedOnDate
{
get { return Model.LastModifiedOnDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int CreatedByUserID
{
get { return Model.CreatedByUserID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime CreatedOnDate
{
get { return Model.CreatedOnDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public EduProgramInfo EduProgram
{
get { return Model.EduProgram; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public EduLevelInfo EduLevel
{
get { return Model.EduLevel; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DivisionInfo Division
{
get { return Model.Division; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public ICollection<EduProgramProfileFormInfo> EduProgramProfileForms
{
get { return Model.EduProgramProfileForms; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public ICollection<DocumentInfo> Documents
{
get { return Model.Documents; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

#endregion
Expand Down
34 changes: 17 additions & 17 deletions R7.University/ViewModels/EduProgramViewModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,103 +39,103 @@ protected EduProgramViewModelBase (IEduProgram model)
public int EduProgramID
{
get { return Model.EduProgramID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int EduLevelID
{
get { return Model.EduLevelID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int? DivisionId
{
get { return Model.DivisionId; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Code
{
get { return Model.Code; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Title
{
get { return Model.Title; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Generation
{
get { return Model.Generation; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string HomePage
{
get { return Model.HomePage; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime? StartDate
{
get { return Model.StartDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime? EndDate
{
get { return Model.EndDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int LastModifiedByUserID
{
get { return Model.LastModifiedByUserID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime LastModifiedOnDate
{
get { return Model.LastModifiedOnDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int CreatedByUserID
{
get { return Model.CreatedByUserID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DateTime CreatedOnDate
{
get { return Model.CreatedOnDate; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public EduLevelInfo EduLevel
{
get { return Model.EduLevel; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public DivisionInfo Division
{
get { return Model.Division; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public ICollection<DocumentInfo> Documents
{
get { return Model.Documents; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public ICollection<EduProgramProfileInfo> EduProgramProfiles
{
get { return Model.EduProgramProfiles; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

#endregion
Expand Down
26 changes: 13 additions & 13 deletions R7.University/ViewModels/EmployeeAchievementViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,79 +38,79 @@ protected EmployeeAchievementViewModelBase (IEmployeeAchievement model)
public int EmployeeAchievementID
{
get { return Model.EmployeeAchievementID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int EmployeeID
{
get { return Model.EmployeeID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int? AchievementID
{
get { return Model.AchievementID; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Title
{
get { return (AchievementID != null) ? Model.Achievement.Title : Model.Title; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string ShortTitle
{
get { return (AchievementID != null) ? Model.Achievement.ShortTitle : Model.ShortTitle; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string Description
{
get { return Model.Description; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int? YearBegin
{
get { return Model.YearBegin; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public int? YearEnd
{
get { return Model.YearEnd; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public bool IsTitle
{
get { return Model.IsTitle; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string DocumentURL
{
get { return Model.DocumentURL; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public string TitleSuffix
{
get { return Model.TitleSuffix; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public AchievementType? AchievementType
{
get { return (AchievementID != null) ? Model.Achievement.AchievementType : Model.AchievementType; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

public AchievementInfo Achievement
{
get { return Model.Achievement; }
set { throw new NotImplementedException (); }
set { throw new InvalidOperationException (); }
}

#endregion
Expand Down
Loading

0 comments on commit baa2f4d

Please sign in to comment.