//This function will uppdate the passed userlogin //INPUT: UserLogin //OUTPUT: functionResult public functionResult UpdateAccountLogin(UserLogin u) { functionResult result = new functionResult(); EncryptionDecrypt edde = new EncryptionDecrypt(); //Create the SQL string. Encrypt the password we are storing string SQL = "UPDATE Logons SET SiteKey = '" + u.SiteKey + "' , username = '******', password = '******', website = '" + u.website + "' WHERE AccountID ='" + u.AccountID + "'"; string output = executeNonQueryV2(SQL); if (output.ToUpper().Contains("ERROR")) { result.Result = false; result.Message = "UpdateAccountLogin: "******"UpdateAccountLogin - OK"; } return(result); }
//This function add a new login //INPUT: UserLogin (contains all details) //OUTPUT: functionResult public functionResult AddAccountLogin(UserLogin u) { functionResult result = new functionResult(); EncryptionDecrypt edde = new EncryptionDecrypt(); //Create the SQL string. Encrypt the password we are storing string SQL = "INSERT INTO Logons (UserID, SiteKey, username, password, website) VALUES ('" + u.UserID + "','" + u.SiteKey + "', '" + u.username + "','" + edde.EncryptString(u.password) + "','" + u.website + "')"; string output = executeNonQueryV2(SQL); if (output.ToUpper().Contains("ERROR")) { result.Result = false; result.Message = "AddAccountLogin: "******"AddAccountLogin - OK"; } return(result); }