Beispiel #1
0
        public static DataTable laybang(string chuoi)
        {
            clsKetnoi      kn = new clsKetnoi();
            SqlDataAdapter da = new SqlDataAdapter(new SqlCommand(chuoi, kn.conn));

            try
            {
                DataTable dt = new DataTable();
                da.Fill(dt);
                return(dt);
            }
            catch { return(null); }
        }
Beispiel #2
0
        public static bool dieuchinh(string chuoi)
        {
            clsKetnoi kn = new clsKetnoi();

            if ((new SqlCommand(chuoi, kn.conn)).ExecuteNonQuery() > 0)
            {
                kn.dongketnoi();
                return(true);
            }
            else
            {
                kn.dongketnoi();
                return(false);
            }
        }