public string[] UserLogIn(LoginInfo loginInfo, ref string replay) { string[] res = new string[4]; string msg_code = string.Empty; string msg = string.Empty; try { string encryptedPassword = objEncrypt.EncryptString(loginInfo.Password, ""); objSqlProcManager = new SqlProcedureManager(connectionString); string spname = "sp_User_Login"; var result = objSqlProcManager.ExecuteNonQueryParam(spname, ref replay, loginInfo.Email, encryptedPassword, loginInfo.UserType, msg_code, msg ); res[0] = result[3].Value.ToString(); res[1] = result[4].Value.ToString(); string decryptedPassword = objEncrypt.DecryptString(encryptedPassword, ""); return(res); } catch (Exception errorException) { throw errorException; } return(res); }
// SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["OnlineBookingConnection"].ConnectionString); #region Security public string[] UserSignUp(UserInfo userInfo, ref string replay) { string[] res = new string[4]; string msg_code = string.Empty; string msg = string.Empty; try { string encryptedPassword = objEncrypt.EncryptString(userInfo.Password, ""); DateTime myDate = Convert.ToDateTime(userInfo.BirthDate); objSqlProcManager = new SqlProcedureManager(connectionString); string spname = "sp_User_Sign_Up_Update"; var result = objSqlProcManager.ExecuteNonQueryParam(spname, ref replay, 0, userInfo.UserId, userInfo.FirstName, userInfo.LastName, userInfo.NickName, myDate.ToString("yyyy-MM-dd"), userInfo.Gender, userInfo.Email, encryptedPassword, userInfo.Phone, userInfo.UserType, userInfo.UserStatus, msg_code, msg ); res[0] = result[12].Value.ToString(); res[1] = result[13].Value.ToString(); // string decryptedPassword = objEncrypt.DecryptString(encryptedPassword, ""); return(res); } catch (Exception errorException) { throw errorException; } return(res); }