Exemplo n.º 1
0
        /// <summary>   Creates a new project. </summary>
        ///
        /// <exception cref="Exception">    Thrown when name or dates are missing. </exception>
        /// <see cref="DAO.AdminDAO.CreateProject(string, DateTime, DateTime, int, int)"/>

        public void CreateProject(string name, DateTime startDate, DateTime endDate, int customerId, int administratorId)
        {
            if (name == "" || name == null || startDate == null || endDate == null)
            {
                throw new Exception("Missing Project data.");
            }
            dao.CreateProject(name, startDate, endDate, customerId, administratorId);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Creates a new project.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="startDate"></param>
 /// <param name="endDate"></param>
 /// <param name="customerId"></param>
 /// <param name="administratorId"></param>
 public void CreateProject(string name, DateTime startDate, DateTime endDate, int customerId, int administratorId)
 {
     ///<remarks> Server-side validation to ensure that the details are provided. </remarks>
     if (name == null || name == "" || startDate == null || endDate == null)
     {
         throw new Exception("Missing Data");
     }
     dao.CreateProject(name, startDate, endDate, customerId, administratorId);
 }