예제 #1
0
 public bool UpdateCTHoaDon(string maHoaDon, string maSP, int soLuong, decimal?donGia, int ck)
 {
     try
     {
         ChiTietHoaDon cthd = context.ChiTietHoaDon.Single(s => s.MaHoaDon.Equals(maHoaDon) && s.MaSP.Equals(maSP));
         cthd.SoLuong   = soLuong;
         cthd.DonGia    = donGia;
         cthd.ChietKhau = ck;
         context.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
예제 #2
0
 public bool InsertCTHoaDon(ref string err, string maHoaDon, string maSP, int soLuong, decimal?donGia, int ck)
 {
     try
     {
         ChiTietHoaDon cthd = new ChiTietHoaDon {
             MaHoaDon  = maHoaDon,
             MaSP      = maSP,
             SoLuong   = soLuong,
             DonGia    = donGia,
             ChietKhau = ck
         };
         context.ChiTietHoaDon.Add(cthd);
         context.SaveChanges();
         return(true);
     }
     catch (Exception e)
     {
         err = e.Message;
         return(false);
     }
 }
예제 #3
0
 public Boolean delete(ChiTietHoaDon chiTietHoaDon)
 {
     return(this.chiTietHoaDonDAO.delete(chiTietHoaDon));
 }
예제 #4
0
 public Boolean insert(ChiTietHoaDon chiTietHoaDon)
 {
     return(this.chiTietHoaDonDAO.insert(chiTietHoaDon));
 }
 public bool themChiTietHoaDon(ChiTietHoaDon chiTietHoaDon)
 {
     return(dal_chiTietHoaDon.themChiTietHoaDon(chiTietHoaDon));
 }
예제 #6
0
 public void EditCTHoaDon(ChiTietHoaDon x)
 {
     hd.EditCTHoaDon(x);
 }
예제 #7
0
 public static bool KiemTraTonTaiChiTietHoaDon(ChiTietHoaDon ct)
 {
     return(db.KiemTraTonTaiChiTietHoaDon(ct));
 }
예제 #8
0
 public static int AddCTHD(ChiTietHoaDon cthd)
 {
     return(CTHDDAO.AddCTHD(cthd));
 }
예제 #9
0
 public bool xoaCTHD(ChiTietHoaDon chiTietHoaDon)
 {
     return(dal_ChiTietHoaDon.xoaCTHD(chiTietHoaDon));
 }
예제 #10
0
 public static void ThemChiTietHoaDon(ChiTietHoaDon ct)
 {
     db.ThemChiTietHoaDon(ct);
 }
예제 #11
0
 public bool chinhSuaSoLuongChiTietHoaDon(ChiTietHoaDon chiTietHoaDon)
 {
     return(dal_ChiTietHoaDon.chinhSuaSoLuongChiTietHoaDon(chiTietHoaDon));
 }
예제 #12
0
 public bool themCTHoaDon(ChiTietHoaDon item)
 {
     return(dal_ChiTietHoaDon.themCTHoaDon(item));
 }
예제 #13
0
 public bool CthoadonInsert(ChiTietHoaDon chitiethoadon)
 {
     return(cthoadon_dal.CthoadonInsert(chitiethoadon));
 }
예제 #14
0
 public Boolean update(ChiTietHoaDon chiTietHoaDon)
 {
     return(this.chiTietHoaDonDAO.update(chiTietHoaDon));
 }
예제 #15
0
 public static int Update(ChiTietHoaDon detail)
 {
     return(BillDetailDAO.Update(detail));
 }
예제 #16
0
 public bool ThemChiTietHoaDon(ChiTietHoaDon chiTiet)
 {
     return(ChiTietHoaDonDAO.Instance.ThemChiTietHoaDon(chiTiet));
 }
예제 #17
0
 public static ChiTietHoaDon GetBillDetail(ChiTietHoaDon detail)
 {
     return(BillDetailDAO.GetBillDetail(detail));
 }
예제 #18
0
 public static int EditCTHD(ChiTietHoaDon cthd)
 {
     return(CTHDDAO.EditCTHD(cthd));
 }
예제 #19
0
 public static int Insert(ChiTietHoaDon cthd)
 {
     return(BillDetailDAO.Insert(cthd));
 }
 public bool capNhat(ChiTietHoaDon chiTietHoaDon)
 {
     return(dal_chiTietHoaDon.capNhat(chiTietHoaDon));
 }
예제 #21
0
 public void AddCTHoaDon(ChiTietHoaDon x)
 {
     hd.AddCTHoaDon(x);
 }