예제 #1
0
        public void InsertListHoaDon(ListHoaDon listHoaDon)
        {
            if (listHoaDon == null || listHoaDon.listHoaDon == null || listHoaDon.listHoaDon.Count == 0)
            {
                return;
            }
            var listHoaDonModel   = new List <ChiTietHoaDonModel>();
            var quanLyHoaDonModel = new QuanLyHoaDonModel()
            {
                NgayThucHien = listHoaDon.NgayThucHien,
                TongTien     = listHoaDon.TongTien
            };

            BaseBLL <QuanLyHoaDon, QuanLyHoaDonModel> .Insert(quanLyHoaDonModel);

            foreach (var hoadon in listHoaDon.listHoaDon)
            {
                var hoaDonModel = BaseBLL <ChiTietHoaDonModel, HoaDonViewModel> .ConvertFromModel(hoadon);

                hoaDonModel.QuanLyHoaDonId = quanLyHoaDonModel.Id;
                listHoaDonModel.Add(hoaDonModel);
            }
            BaseBLL <ChiTietHoaDon, ChiTietHoaDonModel> .InsertList(listHoaDonModel);
        }
예제 #2
0
 public void InsertChiTien(ChiTienModel ChiTien)
 {
     BaseBLL <ChiTien, ChiTienModel> .Insert(ChiTien);
 }
예제 #3
0
 public void InsertQuanLySanPham(QuanLySanPhamModel QuanLySanPham)
 {
     BaseBLL <QuanLySanPham, QuanLySanPhamModel> .Insert(QuanLySanPham);
 }
예제 #4
0
 public void InsertChiTietHoaDon(ChiTietHoaDonModel ChiTietHoaDon)
 {
     BaseBLL <ChiTietHoaDon, ChiTietHoaDonModel> .Insert(ChiTietHoaDon);
 }
예제 #5
0
 public void InsertRole(RoleModel roleModel)
 {
     BaseBLL <Role, RoleModel> .Insert(roleModel);
 }
예제 #6
0
 public void Insert(QuanLyHoaDonModel quanLyHoaDonModel)
 {
     BaseBLL <QuanLyHoaDon, QuanLyHoaDonModel> .Insert(quanLyHoaDonModel);
 }
예제 #7
0
 public void InsertSanPham(SanPhamModel SanPham)
 {
     BaseBLL <SanPham, SanPhamModel> .Insert(SanPham);
 }
예제 #8
0
 public void InsertUser(UserModel userModel)
 {
     BaseBLL <User, UserModel> .Insert(userModel);
 }