Beispiel #1
0
        public void xoaSanPham(string pMaSP)
        {
            QLSanPham item = QLCH.QLSanPhams.Where(sp => sp.MaSP == pMaSP).FirstOrDefault();

            QLCH.QLSanPhams.DeleteOnSubmit(item);
            QLCH.SubmitChanges();
        }
Beispiel #2
0
        public void updateSanPham(string ma, string ten, int gia, int soLuong, string maNCC, string maNSX, string baohanh, string loaisp, string mota)
        {
            QLSanPham sp = QLCH.QLSanPhams.Where(kh => kh.MaSP == ma).FirstOrDefault();

            sp.TenSP      = ten;
            sp.DonGia     = gia;
            sp.SoLuong    = soLuong;
            sp.MaNCC      = maNCC;
            sp.MaNSX      = maNSX;
            sp.ThongTinBH = baohanh;
            sp.LoaiSP     = loaisp;
            sp.MoTa       = mota;

            QLCH.SubmitChanges();
        }
Beispiel #3
0
        public void ThemSanPham(string ma, string ten, int gia, int soLuong, string maNCC, string maNSX, string baohanh, string loaisp, string mota)
        {
            QLSanPham sp = new QLSanPham();

            sp.MaSP       = ma;
            sp.TenSP      = ten;
            sp.DonGia     = gia;
            sp.SoLuong    = soLuong;
            sp.MaNCC      = maNCC;
            sp.MaNSX      = maNSX;
            sp.ThongTinBH = baohanh;
            sp.LoaiSP     = loaisp;
            sp.MoTa       = mota;

            QLCH.QLSanPhams.InsertOnSubmit(sp);
            QLCH.SubmitChanges();
            loadDSSanPham();
        }
Beispiel #4
0
 partial void DeleteQLSanPham(QLSanPham instance);
Beispiel #5
0
 partial void UpdateQLSanPham(QLSanPham instance);
Beispiel #6
0
 partial void InsertQLSanPham(QLSanPham instance);