public void DeleteTepTin(int p, out string linkFile) { DAL.HOSO_TepTinDinhKem teptin = dataContext.HOSO_TepTinDinhKems.Where(t => t.PR_KEY == p).FirstOrDefault(); linkFile = teptin.Link; dataContext.HOSO_TepTinDinhKems.DeleteOnSubmit(teptin); Save(); }
public void UpdateTepTin(HOSO_TepTinDinhKem attachFile, out string oldFilePath) { DAL.HOSO_TepTinDinhKem tmp = GetTepTin(attachFile.PR_KEY); oldFilePath = tmp.Link; tmp.TenTepTin = attachFile.TenTepTin; tmp.GhiChu = attachFile.GhiChu; tmp.Link = attachFile.Link; Save(); }