public static int UpdateTwoFactor(int id, bool enableTwoFactor)
        {
            string sql = @"UPDATE dbo.Account
                            SET TwoFactor = " + Convert.ToInt32(enableTwoFactor) + " WHERE Id = " + id + " ;";

            return(SqlDataAccess.UpdateData(sql));
        }
        public static int UpdatePassword(int id, string newPassword)
        {
            string sql = @"UPDATE dbo.Account
                            SET Password = '******' WHERE Id = " + id + " ;";

            return(SqlDataAccess.UpdateData(sql));
        }
        public static int DeletePhoneNumber(int id)
        {
            string sql = @"UPDATE dbo.Account
                            SET PhoneNumber = NULL, TwoFactor = 0 " +
                         "WHERE Id = " + id + " ;";

            return(SqlDataAccess.UpdateData(sql));
        }
        public static int UpdatePhoneNumber(int id, string phoneNumber)
        {
            string sql = @"UPDATE dbo.Account
                            SET PhoneNumber = '" + phoneNumber + "', TwoFactor = 1 " +
                         "WHERE Id = " + id + " ;";

            return(SqlDataAccess.UpdateData(sql));
        }
Example #5
0
        public static int UpdateLimit(int service_id, decimal limit)
        {
            ServicesModel data = new ServicesModel
            {
                Service_id = service_id,
                Limit      = limit,
            };

            string sql = @"UPDATE dbo.tb_services_balances_sums SET Limit=@Limit 
                           WHERE Service_id=@Service_id ";

            return(SqlDataAccess.UpdateData(sql, data));
        }