示例#1
0
        void SaveMessageDB_HT_ThongTinBenhNhan(OpenPop.Mime.Message message)
        {
            try
            {
                string mes = message.FindFirstPlainTextVersion().GetBodyAsText();

                XDocument xDoc = XDocument.Parse(mes);
                HT_ThongTinNguoiHienTinh bn = new HT_ThongTinNguoiHienTinh(xDoc);
                if (dbht.GetInformationPatient(bn.MaBN) == null)
                {
                    dbht.AddNewPatient(bn);
                }
                else
                {
                    dbht.EditInformationPatient(bn.MaBN, bn);
                }

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