コード例 #1
0
        public void Them(DTO_HoaDon HoaDon)
        {
            string strSQL = "INSERT INTO HoaDon(MaHD,MaBan,MaKH,MaTK_NV,NgayHoaDon,MaDo_Uong,DonGia,SoLuong,ThanhTien,TrangThai)  VALUES ";

            strSQL = strSQL + "('" + HoaDon.MaHD + "', '" + HoaDon.MaBan + "','" + HoaDon.MaKH + "','" + HoaDon.MaTK_NV + "',GETDATE(),'" + HoaDon.MaDo_Uong + "'," + HoaDon.DonGia + "," + HoaDon.SoLuong + "," + HoaDon.ThanhTien + ",'0')";
            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #2
0
        public void Them(DTO_DoUong MaDo_Uong)
        {
            string strSQL = "INSERT INTO DoUong(MaDo_Uong,TenDo_Uong,DonGia,SoLuongTon,GhiChu)  VALUES ( '" + MaDo_Uong.MaDo_Uong + "',N'" + MaDo_Uong.TenDo_Uong + "'," + MaDo_Uong.DonGia + "," + MaDo_Uong.SoLuongTon + ",N'" + MaDo_Uong.GhiChu + "')";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #3
0
        public void Sua(DTO_DoUong MaDo_Uong)
        {
            string strSQL = string.Format(@"UPDATE DoUong set MaDo_Uong = '" + MaDo_Uong.MaDo_Uong + "', TenDo_Uong = N'" + MaDo_Uong.TenDo_Uong + "',DonGia = " + MaDo_Uong.DonGia + ",SoLuongTon = " + MaDo_Uong.SoLuongTon + ",GhiChu = N'" + MaDo_Uong.GhiChu + "' where MaDo_Uong = '" + MaDo_Uong.MaDo_Uong_Sua + "'");

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #4
0
        public void Xoa(DTO_DoUong MaDo_Uong)
        {
            string strSQL = "DELETE DoUong  where MaDo_Uong = '" + MaDo_Uong.MaDo_Uong + "'";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #5
0
        public void Xoa(DTO_HoaDon HoaDon)
        {
            string strSQL = "DELETE HoaDon WHERE MAHD = '" + HoaDon.MaHD + "' ";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #6
0
        public void Sua(DTO_HoaDon HoaDon)
        {
            string strSQL = string.Format(@"UPDATE HoaDon set MaDo_Uong = '" + HoaDon.MaDo_Uong + "',DonGia = " + HoaDon.DonGia + ",SoLuong = " + HoaDon.SoLuong + " where MaHD = '" + HoaDon.MaHD + "'");

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #7
0
        public void Sua(DTO_TaiKhoan_NhanVien TK_NV)
        {
            string strSQL = string.Format(@"UPDATE TaiKhoan_NhanVien set MaTK_NV = '" + TK_NV.MaTK_NV + "', TenTK_NV = N'" + TK_NV.TenTK_NV + "',MatKhau = '" + TK_NV.MatKhau + "',SoDienThoai = '" + TK_NV.SoDienThoai + "',DiaChi = N'" + TK_NV.DiaChi + "',Quyen = '" + TK_NV.Quyen + "'  where MaTK_NV = '" + TK_NV.MaTK_NV_Sua + "'");

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #8
0
        public void Them(DTO_TaiKhoan_NhanVien TK_NV)
        {
            string strSQL = "INSERT INTO TaiKhoan_NhanVien(MaTK_NV,TenTK_NV,MatKhau,SoDienThoai,DiaChi,Quyen)  VALUES ( '" + TK_NV.MaTK_NV + "',N'" + TK_NV.TenTK_NV + "','" + TK_NV.MatKhau + "',N'" + TK_NV.SoDienThoai + "',N'" + TK_NV.DiaChi + "','" + TK_NV.Quyen + "')";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #9
0
        public void Them(DTO_Ban MaBan)
        {
            string strSQL = "INSERT INTO Ban(MaBan,TenBan,SoLuongNguoi,GhiChu)  VALUES ( '" + MaBan.MaBan + "',N'" + MaBan.TenBan + "'," + MaBan.SoLuongNguoi + ",N'" + MaBan.GhiChu + "')";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #10
0
        public void Xoa(DTO_TaiKhoan_NhanVien MaTK_NV)
        {
            string strSQL = "DELETE TaiKhoan_NhanVien  where MaTK_NV = '" + MaTK_NV.MaTK_NV + "'";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #11
0
        public void Sua(DTO_Ban MaBan)
        {
            string strSQL = string.Format(@"UPDATE Ban set MaBan = '" + MaBan.MaBan + "', TenBan = N'" + MaBan.TenBan + "',SoLuongNguoi = " + MaBan.SoLuongNguoi + ",GhiChu = N'" + MaBan.GhiChu + "' where MaBan = '" + MaBan.MaBan_Sua + "'");

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #12
0
        public void Xoa(DTO_Ban MaBan)
        {
            string strSQL = "DELETE Ban  where MaBan = '" + MaBan.MaBan + "'";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #13
0
        public void Them(DTO_KhachHang MaKH)
        {
            string strSQL = "INSERT INTO KhachHang(MaKH,TenKH,SoDienThoai,DiaChi)  VALUES ( '" + MaKH.MaKH + "',N'" + MaKH.TenKH + "','" + MaKH.SoDienThoai + "',N'" + MaKH.DiaChi + "')";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #14
0
        public void Sua(DTO_KhachHang MaKH)
        {
            string strSQL = string.Format(@"UPDATE KhachHang set MaKH = '" + MaKH.MaKH + "', TenKH = N'" + MaKH.TenKH + "',SoDienThoai = '" + MaKH.SoDienThoai + "',DiaChi = N'" + MaKH.DiaChi + "' where MaKH = '" + MaKH.MaKH_Sua + "'");

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }
コード例 #15
0
        public void Xoa(DTO_KhachHang MaKH)
        {
            string strSQL = "DELETE KhachHang  where MaKH = '" + MaKH.MaKH + "'";

            KetNoiSQL.ExecuteNonQuery(strSQL);
        }