public TimeEntry(string creatorUserName, int categoryId, DateTime dateCreated, string description, decimal duration, int id, DateTime reportedDate, string userName) { if (String.IsNullOrEmpty(creatorUserName)) { throw (new NullReferenceException("creatorUserName")); } if (categoryId <= DefaultValues.GetCategoryIdMinValue()) { throw (new ArgumentOutOfRangeException("categoryId")); } if (duration <= DefaultValues.GetDurationMinValue()) { throw (new ArgumentOutOfRangeException("duration")); } if (reportedDate <= DefaultValues.GetDateTimeMinValue()) { throw (new ArgumentOutOfRangeException("reportedDate")); } if (String.IsNullOrEmpty(userName)) { throw (new NullReferenceException("userName")); } _CreatorUserName = creatorUserName; _CategoryId = categoryId; _DateCreated = dateCreated; _Description = description; _Duration = duration; _Id = id; _ReportedDate = reportedDate; _UserName = userName; }
/*** CONSTRUCTOR ***/ public TimeEntry(string creatorUserName, int categoryId, decimal duration, DateTime reportedDate, string userName) : this(creatorUserName, categoryId, DefaultValues.GetDateTimeMinValue(), string.Empty, duration, DefaultValues.GetTimeEntryIdMinValue(), reportedDate, userName) { }
public Project(string creatorUsername, string description, int id, string managerUserName, string name) : this(DefaultValues.GetDurationMinValue(), creatorUsername, DefaultValues.GetDateTimeMinValue(), DefaultValues.GetDateTimeMinValue(), string.Empty, DefaultValues.GetProjectDurationMinValue(), DefaultValues.GetProjectIdMinValue(), managerUserName, name) { }