public static List <string> GetProjectMembers(int Id)
        {
            if (Id <= DefaultValues.GetProjectIdMinValue())
            {
                return(new List <string>());
            }

            DataAccess DALLayer = DataAccessHelper.GetDataAccess();

            return(DALLayer.GetProjectMembers(Id));
        }
        public static Project GetProjectById(int Id)
        {
            if (Id <= DefaultValues.GetProjectIdMinValue())
            {
                return(null);
            }

            DataAccess DALLayer = DataAccessHelper.GetDataAccess();

            return(DALLayer.GetProjectById(Id));
        }
        public static bool DeleteProject(int Id)
        {
            if (Id <= DefaultValues.GetProjectIdMinValue())
            {
                throw (new ArgumentOutOfRangeException("Id"));
            }

            DataAccess DALLayer = DataAccessHelper.GetDataAccess();

            return(DALLayer.DeleteProject(Id));
        }
        public static bool RemoveUserFromProject(int projectId, string userName)
        {
            if (projectId <= DefaultValues.GetProjectIdMinValue())
            {
                throw (new ArgumentOutOfRangeException("projectId"));
            }

            if (String.IsNullOrEmpty(userName))
            {
                throw (new NullReferenceException("userName"));
            }


            DataAccess DALLayer = DataAccessHelper.GetDataAccess();

            return(DALLayer.RemoveUserFromProject(projectId, userName));
        }
Example #5
0
 /*** 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)
 {
 }