Exemple #1
0
 public static void UpdateUserPwd(string UserCode, string NewPwd, string OwnName)
 {
     try
     {
         EntityData entity = SystemManageDAO.GetSystemUserByCode(UserCode);
         try
         {
             if (entity.HasRecord())
             {
                 DataRow currentRow = entity.CurrentRow;
                 if (NewPwd != null)
                 {
                     currentRow["Password"] = NewPwd;
                 }
                 if (OwnName != null)
                 {
                     currentRow["OwnName"] = OwnName;
                 }
                 SystemManageDAO.UpdateSystemUser(entity);
             }
         }
         finally
         {
             entity.Dispose();
         }
     }
     catch (Exception exception)
     {
         throw exception;
     }
 }
Exemple #2
0
        public static string GetUserName(string userCode)
        {
            string text2;

            try
            {
                string     text             = "";
                EntityData systemUserByCode = SystemManageDAO.GetSystemUserByCode(userCode);
                if (systemUserByCode.HasRecord())
                {
                    text = systemUserByCode.GetString("UserName");
                }
                systemUserByCode.Dispose();
                text2 = text;
            }
            catch (Exception exception)
            {
                throw exception;
            }
            return(text2);
        }