public ActionResult Delete(Guid id, FormCollection collection)
 {
     try
     {
         var userId = User.Identity.GetUserName();
         if (userRoleRepository.GetRoleByUserName(userId) != null && userRoleRepository.GetRoleByUserName(userId).IdUserType == "Admin")
         {
             // TODO: Add delete logic here
             if (userRoleRepository.GetRoleByDepartmentName(departmentRepository.GetDepartmentById(id).Name) == null)
             {
                 departmentRepository.DeleteDepartment(id);
                 return(RedirectToAction("Index"));
             }
             else
             {
                 ViewBag.Message_Delete = String.Format("The deletion of this department is not possible, as it is currently in use. Please remove first the associated department from the assigned user roles and then reattempt the deletion operation of the department.");
                 return(View("DeleteDepartment"));
             }
         }
         else
         {
             return(RedirectToAction("Contact", "Home"));
         }
     }
     catch
     {
         ViewBag.Message_Delete = String.Format("The deletion of this department is not possible, as it is currently in use. Please remove first the associated department space on the assigned floor and then reattempt the deletion operation of the department.");
         return(View("DeleteDepartment"));
     }
 }