public int themhd(eHDMuaHangNCC hdmh) { if (kiemtra(hdmh.maHD)) { return(0); } Tbl_HDMuaHangNCC n = new Tbl_HDMuaHangNCC(); n.maHD = hdmh.maHD; n.tenHD = hdmh.tenHD; n.maNCC = hdmh.maNCC; n.maNV = hdmh.maNV; n.ngayLap = Convert.ToDateTime(hdmh.ngayLap); n.noiDung = hdmh.noidung; db.Tbl_HDMuaHangNCCs.InsertOnSubmit(n); db.SubmitChanges(); return(1); }
public static eHDMuaHangNCC e(Tbl_HDMuaHangNCC p) { return(new eHDMuaHangNCC(p.maHD, Convert.ToString(p.ngayLap), p.maNCC, p.maNV, p.noiDung, p.tenHD)); }