Пример #1
0
 public static int DeletePhieuNhap(PhieuNhapObjTr ctd)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@mapn", ctd.MaPN)
     };
     return(ConnectToSQLTr.ExecuteNonQuery("XoaPhieuNhap", para));
 }
Пример #2
0
 public static int UpdatePhieuNhap(PhieuNhapObjTr ctd)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@mapn", ctd.MaPN),
         new SqlParameter("@ngaynhap", ctd.NgayNhap),
         new SqlParameter("@manv", ctd.MaNV),
         new SqlParameter("@mancc ", ctd.MaNCC),
         new SqlParameter("@tongtien", ctd.TongTien)
     };
     return(ConnectToSQLTr.ExecuteNonQuery("SuaPhieuNhap", para));
 }
 public static int UpdateCTPhieuNhap(ChiTietPhieuNhapObjTr ctd)
 {
     SqlParameter[] para = new SqlParameter[]
     {
         new SqlParameter("@mapn", ctd.MaPN),
         new SqlParameter("@masp", ctd.MaSP),
         new SqlParameter("@chungloai", ctd.ChungLoai),
         new SqlParameter("@soluong ", ctd.SoLuong),
         new SqlParameter("@dongia", ctd.DonGia),
         new SqlParameter("@thanhtien", ctd.ThanhTien)
     };
     return(ConnectToSQLTr.ExecuteNonQuery("SuaCTPhieuNhap", para));
 }
Пример #4
0
 public static DataTable GetListNhanVien()
 {
     return(ConnectToSQLTr.GetData(" select * from NhanVien  "));
 }
 public static DataTable GetListTuDongThemGia(SanPhamObjTr dvobj)
 {
     return(ConnectToSQLTr.GetData("  select  TenSP, DonGia from  SanPham where SanPham.MaSP = '" + dvobj.MaSP + "'"));
 }
 public static DataTable GetListData(ChiTietPhieuNhapObjTr cthddv)
 {
     return(ConnectToSQLTr.GetData("  select PhieuNhapChiTiet.MaSP, TenSP,PhieuNhapChiTiet.ChungLoai,PhieuNhapChiTiet.SoLuong , PhieuNhapChiTiet.DonGia , ThanhTien from PhieuNhap , SanPham , PhieuNhapChiTiet where PhieuNhap.MaPN= PhieuNhapChiTiet.MaPN and SanPham.MaSP =  PhieuNhapChiTiet.MaSP and PhieuNhapChiTiet.MaPN = '" + cthddv.MaPN + "'"));
 }
Пример #7
0
 public static DataTable GetListSanPham()
 {
     return ConnectToSQLTr.GetData(" select * from SanPham ");
 }
Пример #8
0
 public static DataTable GetListPhieuNhap()
 {
     return(ConnectToSQLTr.GetData("select  MaPN,NgayNhap,TenNV,TenNCC,TongTien from PhieuNhap hd,NHANVIEN nv, NhaCC kh where hd.MaNV=nv.MaNV and hd.MaNCC=kh.MaNCC"));
 }