예제 #1
0
        //删除管理员信息
        static public int DeleteAdmin(Admin_Info admin_info)
        {
            string sql    = "delete from admin_info where admin_id = @adminID";
            int    result = MySqlHelper.ExecuteNonQuery(MySqlHelper.Conn, CommandType.Text, sql, new MySqlParameter("@adminID", admin_info._AdminID));

            return(result);
        }
예제 #2
0
        //添加管理员
        static public int AddAdmin(Admin_Info admin_info)
        {
            string sql    = "insert into admin_info(admin_id, admin_passward) values (@adminID, @adminPassward)";
            int    result = MySqlHelper.ExecuteNonQuery(MySqlHelper.Conn, CommandType.Text, sql, new MySqlParameter("@adminID", admin_info._AdminID), new MySqlParameter("@adminPassward", admin_info._AdminPassward));

            return(result);
        }