/// <summary>
 /// Method to update UserDepartments.
 /// </summary>
 /// <param name="data">Collection of UserDepartments to add/delete/update. It also contains Department Data</param>
 /// <returns></returns>
 public ActionResult UpdateUserDepartments(UserDepartmentCollectionForDepartment data)
 {
     _userDepartmentRepository.Update(data);
     return(Json("Ok"));
 }
 public bool Update(UserDepartment model)
 {
     return(userdepartmentRepository.Update(model));
 }