Esempio n. 1
0
        void SaveMessageDB_HT_KhamNamKhoa(OpenPop.Mime.Message message)
        {
            try
            {
                string mes = message.FindFirstPlainTextVersion().GetBodyAsText();

                XDocument      xDoc = XDocument.Parse(mes);
                HT_KhamNamKhoa knk  = new HT_KhamNamKhoa(xDoc);
                if (dbht.GetKhamNamKhoaByID(knk.Id) == null)
                {
                    dbht.AddKhamNamKhoa(knk);
                }
                else
                {
                    dbht.EditKhamNamKhoa(knk.Id, knk);
                }

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