public bool XoaCTPNhap(Businessobject.ChiTietPN objec) { try { SqlCommand cmd = new SqlCommand("delete from CTPNhap where MAPN='" + objec.MaPN + "'"); m_ds.ExecuteNoneQuery(cmd); return(true); } catch { return(false); } }
public bool insertCTPN(Businessobject.ChiTietPN ctpn) { SqlCommand cmd = new SqlCommand("insert into CTPNhap values('" + ctpn.MaPN + "','" + ctpn.MaHang + "','" + ctpn.SoLuong + "','" + ctpn.DonGia + "','" + ctpn.Thue + "','" + ctpn.Ngaynhap + "','" + ctpn.Manhanvien + "','" + ctpn.Manhacungcap + "')"); m_ds.ExecuteNoneQuery(cmd); return(true); }