Ejemplo n.º 1
0
        public static void GiamSatNhapLieu_save(string mahs, string thaotac, string danhmuc, string noidung)
        {
            string query = " INSERT INTO [dbo].[tblGiamSatNhapLieu] " +
                           "  ([ThoiDiem] " +
                           "  ,[Username] " +
                           "  ,[MaHoSo] " +
                           "  ,[ThaoTac] " +
                           "  ,[DanhMuc] " +
                           "  ,[NoiDung]) " +
                           "  VALUES " +
                           "  (N'" + DateTime.Now.ToString() + "' " +
                           "  ,N'" + Username + "' " +
                           "  ,N'" + mahs + "' " +
                           "  ,N'" + thaotac + "' " +
                           "  ,N'" + danhmuc + "' " +
                           "  ,N'" + noidung + "' )";
            clsDatabase cls = new clsDatabase();

            cls.ExecuteQueryInsertUpdateDelete(query);
        }
Ejemplo n.º 2
0
        public static void LoadDataGridView(DataGridView grv, string query)
        {
            clsDatabase cls = new clsDatabase();

            grv.DataSource = cls.ExecuteQuery(query).Tables[0];
        }