Exemplo n.º 1
0
        public bool AddUser()
        {
            User item = new User();

            item.SetColumn("RoomID", Kv.Get("RoomID"));
            item.SetColumn("UserStatusID", Kv.Get("UserStatusID"));
            item.SetColumn("RankID", Kv.Get("RankID"));
            item.SetColumn("CountryID", Kv.Get("CountryID"));
            item.SetColumn("NearestCityID", Kv.Get("NearestCityID"));
            item.SetColumn("GenderID", Kv.Get("GenderID"));
            item.SetColumn("FideTitleID", Kv.Get("FideTitleID"));
            item.SetColumn("IccfTitleID", Kv.Get("IccfTitleID"));
            item.SetColumn("FideStrength", Kv.Get("FideStrength"));
            item.SetColumn("IccfStrength", Kv.Get("IccfStrength"));
            item.SetColumn("ScocialID", Kv.Get("ScocialID"));
            item.SetColumn("UserName", Kv.Get("UserName"));
            item.SetColumn("Email", Kv.Get("Email"));
            item.SetColumn("FirstName", Kv.Get("FirstName"));
            item.SetColumn("LastName", Kv.Get("LastName"));
            item.SetColumn("Engine", Kv.Get("Engine"));
            item.SetColumn("PasswordHint", Kv.Get("PasswordHint"));
            item.SetColumn("PersonalNotes", Kv.Get("PersonalNotes"));
            item.SetColumn("Url", Kv.Get("Url"));
            item.SetColumn("DateLastLogin", Kv.Get("DateLastLogin"));
            item.SetColumn("DateOfBirth", Kv.Get("DateOfBirth"));
            item.SetColumn("Password", UCrypto.Encrypt(Kv.Get("Password")));
            item.Save();


            return(false);
        }
Exemplo n.º 2
0
 private void Decrypt(string s)
 {
     try
     {
         rtbFileContent.Text = UCrypto.Decrypt(s);
     }
     catch (Exception ex)
     {
         TestDebugger.Instance.WriteError(ex);
         MessageForm.Show(ex);
     }
 }
Exemplo n.º 3
0
        public static DataSet ChangePassword(string txtPassword, string txtPasswordHint)
        {
            Kv kv = new Kv();

            kv.Set("MethodName", (int)MethodNameE.ChangePassword);
            kv.Set(StdKv.CurrentUserID, Ap.CurrentUserID);
            kv.Set("UserId", Ap.CurrentUserID);
            kv.Set("Password", UCrypto.Encrypt(txtPassword));
            kv.Set("PasswordHint", txtPasswordHint);
            DataSet ds = SocketClient.Instance.Invoke(kv.DataTable.Copy());

            return(ds);
        }
        public static DataSet LoginUser(string loginId, string password, string accessCode)
        {
            Kv kv = new Kv();

            kv.Set("MethodName", (int)MethodNameE.LoginUser);
            kv.Set(StdKv.CurrentUserID, Ap.CurrentUserID);
            kv.Set("LoginId", loginId);
            kv.Set("Password", UCrypto.Encrypt(password));
            kv.Set("AccessCode", Options.Instance.ApplicationCode);
            kv.Set("MachineCode", WmiHelper.GetMachineKey());
            DataSet ds = SocketClient.Instance.Invoke(kv.DataTable);

            return(ds);
        }
Exemplo n.º 5
0
 private static void WriteZip(string filePath)
 {
     UZip.WriteZip(filePath, UCrypto.Decrypt(File.ReadAllText(filePath)));
 }
Exemplo n.º 6
0
 public static string GetUrlActivateAccount(string userName)
 {
     return(UWeb.GetUrl("http://RafeySoft.com/Web/Page/Account/Register.aspx", "rt", AccountRequestTypeE.ActivateAccount.ToString("d"), "rid", UCrypto.ToBase64(userName)));
 }