public void Clone(CardPasswordAgentUsers cardPasswordUsers)
 {
     cardPasswordUsers.ID       = ID;
     cardPasswordUsers.Company  = Company;
     cardPasswordUsers.Password = Password;
     cardPasswordUsers.Name     = Name;
     cardPasswordUsers.State    = State;
     cardPasswordUsers.Url      = Url;
 }
        public static CardPasswordAgentUsers GetCurrentUser()
        {
            string Key = (System.Web.HttpContext.Current.Session.SessionID + "").ToLower() + "_CardPasswordAgentUsers";

            // 从 Cookie 中取出 UserID
            HttpCookie cookieUser = HttpContext.Current.Request.Cookies[Key];

            if ((cookieUser == null) || (String.IsNullOrEmpty(cookieUser.Value)))
            {
                return(null);
            }

            string CookieUserID = cookieUser.Value;

            try
            {
                CookieUserID = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Security.Encrypt.Decrypt3DES(PF.GetCallCert(), CookieUserID, PF.DesKey));
            }
            catch
            {
                CookieUserID = "";
            }

            if (String.IsNullOrEmpty(CookieUserID))
            {
                return(null);
            }

            int UserID = Shove._Convert.StrToInt(CookieUserID, -1);

            if (UserID < 1)
            {
                return(null);
            }

            CardPasswordAgentUsers cardPasswordUsers = new CardPasswordAgentUsers();

            cardPasswordUsers.ID = UserID;

            string ReturnDescription = "";
            int    Result            = cardPasswordUsers.GetInformationByID(ref ReturnDescription);

            if (Result < 0)
            {
                return(null);
            }

            return(cardPasswordUsers);
        }
 public void Clone(CardPasswordAgentUsers cardPasswordUsers)
 {
     cardPasswordUsers.ID = ID;
     cardPasswordUsers.Company = Company;
     cardPasswordUsers.Password = Password;
     cardPasswordUsers.Name = Name;
     cardPasswordUsers.State = State;
     cardPasswordUsers.Url = Url;
 }
        public static CardPasswordAgentUsers GetCurrentUser()
        {
            string Key = (System.Web.HttpContext.Current.Session.SessionID + "").ToLower() + "_CardPasswordAgentUsers";

            // 从 Cookie 中取出 UserID
            HttpCookie cookieUser = HttpContext.Current.Request.Cookies[Key];

            if ((cookieUser == null) || (String.IsNullOrEmpty(cookieUser.Value)))
            {
                return null;
            }

            string CookieUserID = cookieUser.Value;

            try
            {
                CookieUserID = Shove._Security.Encrypt.UnEncryptString(PF.GetCallCert(), Shove._Security.Encrypt.Decrypt3DES(PF.GetCallCert(), CookieUserID, PF.DesKey));
            }
            catch
            {
                CookieUserID = "";
            }

            if (String.IsNullOrEmpty(CookieUserID))
            {
                return null;
            }

            int UserID = Shove._Convert.StrToInt(CookieUserID, -1);

            if (UserID < 1)
            {
                return null;
            }

            CardPasswordAgentUsers cardPasswordUsers = new CardPasswordAgentUsers();

            cardPasswordUsers.ID = UserID;

            string ReturnDescription = "";
            int Result = cardPasswordUsers.GetInformationByID(ref ReturnDescription);

            if (Result < 0)
            {
                return null;
            }

            return cardPasswordUsers;
        }