void SaveMessageDB_HT_TinhDichDo(OpenPop.Mime.Message message) { try { string mes = message.FindFirstPlainTextVersion().GetBodyAsText(); XDocument xDoc = XDocument.Parse(mes); HT_TinhDichDo tdd = new HT_TinhDichDo(xDoc); if (dbht.GetTinhDichDoByID(tdd.Id) == null) { dbht.AddTinhDichDo(tdd); } else { dbht.EditTinhDichDo(tdd.Id, tdd); } SaveFile(message); } catch (Exception ex) { throw ex; } }