void SaveMessageDB_HT_KQXN(OpenPop.Mime.Message message) { try { string mes = message.FindFirstPlainTextVersion().GetBodyAsText(); XDocument xDoc = XDocument.Parse(mes); HT_KetQuaXetNghiem kq = new HT_KetQuaXetNghiem(xDoc); if (dbht.GetKetQuaXetNghiemByID(kq.Id) == null) { dbht.AddKetQuaXetNghiem(kq); } else { dbht.EditKetQuaXetNghiem(kq.Id, kq); } SaveFile(message); } catch (Exception ex) { throw ex; } }