Example #1
0
        public void TestCreateProjectWithNoTUserAdmin()
        {
            var admin_user_id = GetUserID("TestCreateProjectWithUserAdmin", null);
            var user_id       = GetUserID("TestCreateProjectWithNoTUserAdmin", admin_user_id);

            string message = "You do not have permission to do this acction!";

            TestCreateProjectException(admin_user_id, user_id, new ProjectCreateM
            {
                EndDate       = DateTime.Now.AddMonths(10),
                Name          = "TestCreateProjectName",
                ProjectTypeId = _projectType.GetAll()[0].Id,
                StartDate     = DateTime.Now
            }, message);
        }
Example #2
0
 private void GetViewBags()
 {
     ViewBag.Locations     = new SelectList(_locationService.GetAll(), "Id", "Name");
     ViewBag.ProjectTypes  = new SelectList(_projectTypeService.GetAll(), "Id", "Name");
     ViewBag.PropertyTypes = new SelectList(_propertyTypeService.GetAll(), "Id", "Name");
     ViewBag.UnitTypeS     = new SelectList(_unitTypeService.GetAll(), "Id", "Name");
 }