Пример #1
0
        public static ArrayList GetUpdate(Test test)
        {
            MYsql  my  = new MYsql();
            string sql = string.Format("update test SET NAME = '{0}',passwd='{1}' WHERE id = '{2}';", test.name, test.passwd, test.id);

            if (my.NonQuery(sql))
            {
                return(GetSelect());
            }
            else
            {
                return(new ArrayList());
            }
        }
Пример #2
0
        public static ArrayList GetDelete(Test test)
        {
            MYsql  my  = new MYsql();
            string sql = string.Format("DELETE FROM test WHERE id = '{0}';", test.id);

            if (my.NonQuery(sql))
            {
                return(GetSelect());
            }
            else
            {
                return(new ArrayList());
            }
        }
Пример #3
0
        public static ArrayList GetInsert(Test test)
        {
            MYsql  my  = new MYsql();
            string sql = string.Format("insert into test values ('{0}','{1}','{2}');", test.id, test.name, test.passwd);

            if (my.NonQuery(sql))
            {
                return(GetSelect());
            }
            else
            {
                return(new ArrayList());
            }
        }