Exemple #1
0
        void SaveMessageDB_HT_NguoiVanDong(OpenPop.Mime.Message message)
        {
            try
            {
                string mes = message.FindFirstPlainTextVersion().GetBodyAsText();

                XDocument       xDoc = XDocument.Parse(mes);
                HT_NguoiVanDong nvd  = new HT_NguoiVanDong(xDoc);
                if (dbht.GetNguoiVanDongByID(nvd.Id) == null)
                {
                    dbht.AddNguoiVanDong(nvd);
                }
                else
                {
                    dbht.EditNguoiVanDong(nvd.Id, nvd);
                }

                SaveFile(message);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }