Exemple #1
0
        /// <summary>
        /// Edit existing User
        /// Modified By Nilmini 2013/12/18
        /// </summary>
        /// <param name="objUser">Object of a u_User class carried Employee ID</param>
        /// <returns>if saved or updated successfully, returns true, else false</returns>
        public bool EditUser(u_User objUser)
        {
            try
            {
                u_User_DL objUserDL = new u_User_DL();
                objUser.strPassword = CreateCheckPassword(true, objUser.strPassword);
                //if (objUserDL.isUserIDExistforEmployee(objUser) == true)
                //{
                //    return objUserDL.UpdateUser(objUser);
                //}


                return(objUserDL.UpdateUser(objUser));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #2
0
 /// <summary>
 /// Save new User or update existing User
 /// Modified By Nilmini 2013/10/28
 /// </summary>
 /// <param name="objUser">Object of a u_User class carried Employee ID</param>
 /// <returns>if saved or updated successfully, returns true, else false</returns>
 public bool SaveUser(u_User objUser)
 {
     try
     {
         u_User_DL objUserDL = new u_User_DL();
         objUser.strPassword = CreateCheckPassword(true, objUser.strPassword);
         if (objUserDL.isUserIDExistforEmployee(objUser) == true)
         {
             return(objUserDL.UpdateUser(objUser));
         }
         else
         {
             return(objUserDL.saveUser(objUser));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }