Example #1
0
 private static void PrepareCommand(OracleCommand command, System_user user)
 {
     command.BindByName = true;
     command.Parameters.AddWithValue(":id", user.Id);
     command.Parameters.AddWithValue(":username", user.Username);
     command.Parameters.AddWithValue(":rights", user.Rights);
 }
Example #2
0
        public static int Update(System_user user, DatabaseT pDb = null)
        {
            DatabaseT db = new DatabaseT();

            db.Connect();
            OracleCommand command = db.CreateCommand(SQL_UPDATE);

            PrepareCommand(command, user);
            int ret = db.ExecuteNonQuery(command);

            db.Close();
            return(ret);
        }