Ejemplo n.º 1
0
        public void EditKho(PhieuNhap pn)
        {
            var model = (from c in db.PhieuNhaps
                         where c.MaPhieuNhap == pn.MaPhieuNhap
                         select c).FirstOrDefault();

            model.MaNhanVien   = pn.MaNhanVien;
            model.NgayNhap     = pn.NgayNhap;
            model.MaNhaCungCap = pn.MaNhaCungCap;


            db.Entry(model).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
        }
Ejemplo n.º 2
0
        public void EditHoaDon(HoaDon hd)
        {
            var model = (from c in db.HoaDons
                         where c.MaHoaDon == hd.MaHoaDon
                         select c).FirstOrDefault();

            model.MaHoaDon    = hd.MaHoaDon;
            model.MaNhanVien  = hd.MaNhanVien;
            model.MaKhachHang = hd.MaKhachHang;
            model.NgayBan     = hd.NgayBan;


            db.Entry(model).State = System.Data.Entity.EntityState.Modified;
            db.SaveChanges();
        }