Ejemplo n.º 1
0
        /// <summary>
        /// Deletes Assistant based on its UserId from database
        /// </summary>
        /// <param name="id"></param>
        /// <returns>Flag as true if deleted successfully else false</returns>
        public bool DeleteAssistant(int id)
        {
            AssistantEditRemove assistantRemove = new AssistantEditRemove();

            if (assistantRemove.RemoveAssistant(id))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Updates the Assistant info and stores it into database
 /// </summary>
 /// <param name="user"></param>
 /// <returns>Flag as true if updated successfully else false</returns>
 public bool UpdateAssistant(Users user)
 {
     try
     {
         user.Password = encrypt.Encrypt(user.Password);
         AssistantEditRemove assistantEdit = new AssistantEditRemove();
         return(assistantEdit.EditAssistant(user));
     }
     catch (EmailAlreadyExistsEx ex)
     {
         throw ex;
     }
     catch (PhoneAlreadyExistsEx ex)
     {
         throw ex;
     }
     catch (Exception e)
     {
         throw e;
     }
 }