//them hàng hóa vào phieu nhap vào public void ThemHHVaoPhieuNhap(string ma, string mahh, int sl, float dg) { ChiTietPhieuNhapHang ct = new ChiTietPhieuNhapHang(); ct.maPN = ma; ct.maMH = mahh; ct.SoLuong = sl; ct.DonGia = dg; da.ChiTietPhieuNhapHangs.InsertOnSubmit(ct); da.SubmitChanges(); }
public static void Them(string MaPhieu, string MaHang, string MaDonVi, int SoLuong, double DonGia, string GhiChu) { var db = new PerfectAppEntities(); ChiTietPhieuNhapHang ct = new ChiTietPhieuNhapHang(); ct.MaPhieu = MaPhieu; ct.MaHang = MaHang; ct.MaDonVi = MaDonVi; ct.SoLuong = SoLuong; ct.DonGia = DonGia; ct.GhiChu = GhiChu; db.ChiTietPhieuNhapHangs.Add(ct); db.SaveChanges(); }
public async Task <int> UpdateChiTietPhieuNhapHang(ChiTietPhieuNhapHang thuocTinhHangHoa) { _context.Entry(thuocTinhHangHoa).State = EntityState.Modified; return(await _context.SaveChangesAsync()); }
public async Task <int> AddChiTietPhieuNhapHang(ChiTietPhieuNhapHang thuocTinhHangHoa) { await _context.ChiTietPhieuNhapHang.AddAsync(thuocTinhHangHoa); return(await _context.SaveChangesAsync()); }