コード例 #1
0
        public DataTable DocBanAn_CommitTran(int maNH, string khuvuc, string succhua)
        {
            //Provider provider = new Provider();
            DataTable tb  = new DataTable();
            string    sql = "SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED select b.MaBan,k.TenKhuVuc,k.ViTri,lb.SucChua,b.TrangThai,nh.TenNH";

            sql += " from BanAn b,KhuVuc k,NhaHang n,LoaiBan lb,NhaHang nh";
            sql += " where b.MaKhuVuc=k.MaKhuVuc and b.LoaiBan=lb.MaLoai and nh.MaNH=n.MaNH and n.MaNH=" + maNH + khuvuc + succhua;
            // sql += " and b.maban not in(select MaBan from DatBan where MaNH="+ maNH+" and ThoiGianDen=CONVERT(nvarchar,GETDATE(),101) and TrangThai=0)";
            sql        += " commit tran";
            provider.cm = provider.CreateCommandStringSql(sql);
            return(provider.ExecSelectCommand_CloseConnection(provider.cm));
        }
コード例 #2
0
 public static DataTable DocLoaiNhanVien_commit()
 {
     Provider provider = new Provider();
     string sql = "select MaLoai,TenLoai from LoaiNV commit tran";
     SqlCommand cm = provider.CreateCommandStringSql(sql);
     return provider.ExecSelectCommand_CloseConnection(cm);
 }
コード例 #3
0
        public DataTable DocLoaiNhanVien_commit()
        {
            // Provider provider = new Provider();
            string sql = "select MaLoai,TenLoai from LoaiNV commit tran";

            provider.cm = provider.CreateCommandStringSql(sql);
            return(provider.ExecSelectCommand_CloseConnection(provider.cm));
        }