public void Update(DM_TT_LAMVIEC obj) { DAL.DM_TT_LAMVIEC update = GetbyPrKey(obj.PR_KEY); if (update != null) { update.IS_IN_USED = obj.IS_IN_USED; update.DIEN_GIAI = obj.DIEN_GIAI; update.CREATED_USER = obj.CREATED_USER; update.DATE_CREATE = obj.DATE_CREATE; update.KYHIEU_TT_LAMVIEC = obj.KYHIEU_TT_LAMVIEC; update.QUI_UOC_CHAM_CONG = obj.QUI_UOC_CHAM_CONG; update.STT = obj.STT; update.TEN_TT_LAMVIEC = obj.TEN_TT_LAMVIEC; Save(); } }
public void DeleteByPrkey(int pr_key) { DAL.DM_TT_LAMVIEC deleted = GetbyPrKey(pr_key); dataContext.DM_TT_LAMVIECs.DeleteOnSubmit(deleted); Save(); }