public void xoaPN(string id) { pnhap pn = (from c in db.pnhaps select c).Single(x => x.id == id); db.pnhaps.DeleteOnSubmit(pn); db.SubmitChanges(); }
public void suapn(string id, DateTime ngaynhap, string iddt, string ghichu, int so, string loainhap, string tiente, float tygia, double tch) { pnhap pn = (from c in db.pnhaps select c).Single(x => x.id == id); pn.ngaynhap = ngaynhap; pn.iddt = iddt; pn.ghichu = ghichu; pn.so = so; pn.tiente = tiente; pn.tygia = tygia; pn.loainhap = loainhap; pn.tch = tch; db.SubmitChanges(); }
public void moipn(string id, DateTime ngaynhap, string iddt, string iddv, string idnv, string ghichu, int so, string loainhap, string tiente, float tygia, double tch) { pnhap pn = new pnhap(); pn.id = id; pn.ngaynhap = ngaynhap; pn.iddt = iddt; pn.iddv = iddv; pn.idnv = idnv; pn.ghichu = ghichu; pn.so = so; pn.loainhap = loainhap; pn.tiente = tiente; pn.tygia = tygia; pn.tch = tch; db.pnhaps.InsertOnSubmit(pn); db.SubmitChanges(); }