Ejemplo n.º 1
0
        /// <summary>
        /// Phuong thuc xoa nhom san pham theo MaNhom
        /// </summary>
        /// <param name="MaNhom">Ma san pham can xoa</param>
        public static void Delete_NhomSanPham(string MaNhom)
        {
            SqlCommand cmd = new SqlCommand("Delete_NhomSanPham");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaNhom", MaNhom);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Phuong thuc xoa khach hang theo id
        /// </summary>
        /// <param name="Id_Khach_Hang"></param>
        public static void Delete_KhachHang(string Id_Khach_Hang)
        {
            SqlCommand cmd = new SqlCommand("Delete_KhachHang");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Id_Khach_Hang", Id_Khach_Hang);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Phuong thuc xoa tai khoan theo ten dang nhap
        /// </summary>
        /// <param name="TenDangNhap">Ten dang nhap can xoa</param>
        public static void Delete_TaiKhoan(string TenDangNhap)
        {
            SqlCommand cmd = new SqlCommand("Delete_TaiKhoan");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@TenDangNhap", TenDangNhap);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Phuong thuc xoa danh muc san pham theo MaDanhMucSP
        /// </summary>
        /// <param name="MaQuyen"></param>
        public static void Delete_QuyenDangNhap(string MaQuyen)
        {
            SqlCommand cmd = new SqlCommand("Delete_QuyenDangNhap");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaQuyen", MaQuyen);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Phuong thuc xoa danh muc san pham theo MaDanhMucSP
        /// </summary>
        /// <param name="MaDanhMucSP">Ma san pham can xoa</param>
        public static void Delete_DanhMucSP(string MaDanhMucSP)
        {
            SqlCommand cmd = new SqlCommand("Delete_DanhMucSP");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDanhMucSP", MaDanhMucSP);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 6
0
        /// <summary>
        /// Phuong thuc xoa anh quang cao theo MaAnh
        /// </summary>
        /// <param name="MaAnh"></param>
        public static void Delete_AnhQuangCao(string MaAnh)
        {
            SqlCommand cmd = new SqlCommand("Delete_AnhQuangCao");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaAnh", MaAnh);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Phuong thuc xoa danh muc san pham theo MaDanhMucSP
        /// </summary>
        /// <param name="MaCauHoiBaoMat"></param>
        public static void Delete_CauHoiBaoMat(string MaCauHoiBaoMat)
        {
            SqlCommand cmd = new SqlCommand("Delete_CauHoiBaoMat");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaCauHoiBaoMat", MaCauHoiBaoMat);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// Them moi 1 cau hoi
        /// </summary>
        /// <param name="CauHoi"></param>
        /// <param name="ret"></param>
        public static void Insert_CauHoiBaoMat(string CauHoi, string ret)
        {
            SqlCommand cmd = new SqlCommand("Insert_CauHoiBaoMat");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@CauHoi", CauHoi);
            cmd.Parameters.AddWithValue("@ret", ret);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 9
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin nhom quang cao
        /// </summary>
        /// <param name="MaNhom"></param>
        /// <param name="TenNhom"></param>
        /// <param name="Vitri"></param>
        public static void Update_NhomQuangCao(string MaNhom, string TenNhom, string Vitri)
        {
            SqlCommand cmd = new SqlCommand("Update_NhomQuangCao");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaNhom", MaNhom);
            cmd.Parameters.AddWithValue("@TenNhom", TenNhom);
            cmd.Parameters.AddWithValue("@Vitri", Vitri);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Them moi 1 quyen dang nhap
        /// </summary>
        /// <param name="TenQuyen"></param>
        /// <param name="MaQuyenCha"></param>
        /// <param name="ret"></param>
        public static void Insert_QuyenDangNhap(string TenQuyen, string MaQuyenCha, string ret)
        {
            SqlCommand cmd = new SqlCommand("Insert_QuyenDangNhap");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@TenQuyen", TenQuyen);
            cmd.Parameters.AddWithValue("@MaQuyenCha", MaQuyenCha);
            cmd.Parameters.AddWithValue("@ret", ret);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 11
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin danh muc san pham
        /// </summary>
        /// <param name="MaDanhMucSP"></param>
        /// <param name="TenDanhMucSP"></param>
        /// <param name="SoSPHienThi"></param>
        public static void Update_DanhMucSP(string MaDanhMucSP, string TenDanhMucSP, string MaDanhMucCha, string SoSPHienThi)
        {
            SqlCommand cmd = new SqlCommand("Update_DanhMucSP");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDanhMucSP", MaDanhMucSP);
            cmd.Parameters.AddWithValue("@TenDanhMucSP", TenDanhMucSP);
            cmd.Parameters.AddWithValue("@MaDanhMucCha", MaDanhMucCha);
            cmd.Parameters.AddWithValue("@SoSPHienThi", SoSPHienThi);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 12
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin nhom san pham
        /// </summary>
        /// <param name="MaNhom"></param>
        /// <param name="TenNhom"></param>
        /// <param name="ThuTu"></param>
        /// <param name="SoSPHienThi"></param>
        public static void Update_NhomSanPham(string MaNhom, string TenNhom, string ThuTu, string SoSPHienThi)
        {
            SqlCommand cmd = new SqlCommand("Update_NhomSanPham");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaNhom", MaNhom);
            cmd.Parameters.AddWithValue("@TenNhom", TenNhom);
            cmd.Parameters.AddWithValue("@ThuTu", ThuTu);
            cmd.Parameters.AddWithValue("@SoSPHienThi", SoSPHienThi);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 13
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin ChiTietDonHang
        /// </summary>
        /// <param name="MaChiTiet"></param>
        /// <param name="MaSP"></param>
        /// <param name="MaDonDatHang"></param>
        /// <param name="SoLuongDat"></param>
        /// <param name="DonGiaDat"></param>
        public static void Update_ChiTietDonHang(string MaChiTiet, string MaSP, string MaDonDatHang, string SoLuongDat, string DonGiaDat)
        {
            SqlCommand cmd = new SqlCommand("Update_ChiTietDonHang");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaChiTiet", MaChiTiet);
            cmd.Parameters.AddWithValue("@MaSP", MaSP);
            cmd.Parameters.AddWithValue("@MaDonDatHang", MaDonDatHang);
            cmd.Parameters.AddWithValue("@SoLuongDat", SoLuongDat);
            cmd.Parameters.AddWithValue("@DonGiaDat", DonGiaDat);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 14
0
        /// <summary>
        /// Phuong thuc cap nhat Menu
        /// </summary>
        /// <param name="Ma"></param>
        /// <param name="TenMenu"></param>
        /// <param name="ThuTu"></param>
        /// <param name="MaMenuCha"></param>
        /// <param name="LienKet"></param>
        public static void Update_Menu(string Ma, string TenMenu, string ThuTu, string MaMenuCha, string LienKet)
        {
            SqlCommand cmd = new SqlCommand("Update_Menu");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Ma", Ma);
            cmd.Parameters.AddWithValue("@TenMenu", TenMenu);
            cmd.Parameters.AddWithValue("@ThuTu", ThuTu);
            cmd.Parameters.AddWithValue("@MaMenuCha", MaMenuCha);
            cmd.Parameters.AddWithValue("@LienKet", LienKet);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 15
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin anh quang cao
        /// </summary>
        /// <param name="MaAnh"></param>
        /// <param name="MaNhom"></param>
        /// <param name="TenQuangCao"></param>
        /// <param name="Anh"></param>
        /// <param name="Thutu"></param>
        /// <param name="LienKet"></param>
        public static void Update_AnhQuangCao(string MaAnh, string MaNhom, string TenQuangCao, string Anh, string Thutu, string LienKet)
        {
            SqlCommand cmd = new SqlCommand("Update_AnhQuangCao");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaAnh", MaAnh);
            cmd.Parameters.AddWithValue("@MaNhom", MaNhom);
            cmd.Parameters.AddWithValue("@TenQuangCao", TenQuangCao);
            cmd.Parameters.AddWithValue("@Anh", Anh);
            cmd.Parameters.AddWithValue("@Thutu", Thutu);
            cmd.Parameters.AddWithValue("@LienKet", LienKet);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin khach hang
        /// </summary>
        /// <param name="Id_Khach_Hang"></param>
        /// <param name="TenKH"></param>
        /// <param name="Facebook"></param>
        /// <param name="Email"></param>
        /// <param name="MatKhau"></param>
        /// <param name="Sdt"></param>
        /// <param name="DiaChi"></param>
        public static void Update_KhachHang(string Id_Khach_Hang, string TenKH, string Facebook, string Email, string MatKhau, string Sdt, string DiaChi)
        {
            SqlCommand cmd = new SqlCommand("Update_KhachHang");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@Id_Khach_Hang", Id_Khach_Hang);
            cmd.Parameters.AddWithValue("@TenKH", TenKH);
            cmd.Parameters.AddWithValue("@Facebook", Facebook);
            cmd.Parameters.AddWithValue("@Email", Email);
            cmd.Parameters.AddWithValue("@MatKhau", MatKhau);
            cmd.Parameters.AddWithValue("@Sdt", Sdt);
            cmd.Parameters.AddWithValue("@DiaChi", DiaChi);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 17
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin hang hoa
        /// </summary>
        /// <param name="MaSP"></param>
        /// <param name="MaDanhMucSP"></param>
        /// <param name="DacDiemSP"></param>
        /// <param name="GiaSP"></param>
        /// <param name="Anh"></param>
        /// <param name="TenSanPham"></param>
        /// <param name="MaNhom"></param>
        public static void Update_SanPham(string MaSP, string MaDanhMucSP, string DacDiemSP, string GiaSP, string Anh, string TenSanPham, string MaNhom)
        {
            SqlCommand cmd = new SqlCommand("Update_SanPham");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaSP", MaSP);
            cmd.Parameters.AddWithValue("@MaDanhMucSP", MaDanhMucSP);
            cmd.Parameters.AddWithValue("@DacDiemSP", DacDiemSP);
            cmd.Parameters.AddWithValue("@GiaSP", GiaSP);
            cmd.Parameters.AddWithValue("@Anh", Anh);
            cmd.Parameters.AddWithValue("@TenSanPham", TenSanPham);
            cmd.Parameters.AddWithValue("@MaNhom", MaNhom);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 18
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin don hang
        /// </summary>
        /// <param name="MaDonDatHang"></param>
        /// <param name="GhiChu"></param>
        /// <param name="NgayTao"></param>
        /// <param name="ThanhTien"></param>
        /// <param name="TinhTrangDonHang"></param>
        /// <param name="Id_Khach_Hang"></param>
        /// <param name="TenKH"></param>
        /// <param name="SdtKH"></param>
        /// <param name="EmailKH"></param>
        /// <param name="DiaChi"></param>
        public static void Update_DonHang(string MaDonDatHang, string GhiChu, string NgayTao, string ThanhTien, string TinhTrangDonHang, string Id_Khach_Hang, string TenKH, string SdtKH, string EmailKH, string DiaChi)
        {
            SqlCommand cmd = new SqlCommand("Update_DonHang");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@MaDonDatHang", MaDonDatHang);
            cmd.Parameters.AddWithValue("@GhiChu", GhiChu);
            cmd.Parameters.AddWithValue("@NgayTao", NgayTao);
            cmd.Parameters.AddWithValue("@ThanhTien", ThanhTien);
            cmd.Parameters.AddWithValue("@TinhTrangDonHang", TinhTrangDonHang);
            cmd.Parameters.AddWithValue("@Id_Khach_Hang", Id_Khach_Hang);
            cmd.Parameters.AddWithValue("@TenKH", TenKH);
            cmd.Parameters.AddWithValue("@SdtKH", SdtKH);
            cmd.Parameters.AddWithValue("@EmailKH", EmailKH);
            cmd.Parameters.AddWithValue("@DiaChi", DiaChi);
            SQLDataBase.ExecuteNoneQuery(cmd);
        }
Ejemplo n.º 19
0
        /// <summary>
        /// Phuong thuc cap nhat thong tin tai khoan
        /// </summary>
        /// <param name="TenDangNhap"></param>
        /// <param name="MatKhau"></param>
        /// <param name="EmailDK"></param>
        /// <param name="DiaChiDK"></param>
        /// <param name="TenDayDu"></param>
        /// <param name="MaCauHoiBaoMat"></param>
        /// <param name="CauTraLoi"></param>
        /// <param name="NgaySinh"></param>
        /// <param name="GioiTinh"></param>
        /// <param name="MaQuyen"></param>
        public static void Update_TaiKhoan(string TenDangNhap, string MatKhau, string EmailDK, string DiaChiDK, string TenDayDu, string MaCauHoiBaoMat, string CauTraLoi, string NgaySinh, string GioiTinh, string MaQuyen)
        {
            SqlCommand cmd = new SqlCommand("Update_TaiKhoan");

            cmd.CommandType = CommandType.StoredProcedure;
            cmd.Parameters.AddWithValue("@TenDangNhap", TenDangNhap);
            cmd.Parameters.AddWithValue("@MatKhau", MatKhau);
            cmd.Parameters.AddWithValue("@EmailDK", EmailDK);
            cmd.Parameters.AddWithValue("@DiaChiDK", DiaChiDK);
            cmd.Parameters.AddWithValue("@TenDayDu", TenDayDu);
            cmd.Parameters.AddWithValue("@MaCauHoiBaoMat", MaCauHoiBaoMat);
            cmd.Parameters.AddWithValue("@CauTraLoi", CauTraLoi);
            cmd.Parameters.AddWithValue("@NgaySinh", NgaySinh);
            cmd.Parameters.AddWithValue("@GioiTinh", GioiTinh);
            cmd.Parameters.AddWithValue("@MaQuyen", MaQuyen);

            SQLDataBase.ExecuteNoneQuery(cmd);
        }