Esempio n. 1
0
 private void ReceiveEmail()
 {
     Guid Receiver = Guid.Parse("31A9DE51-C207-4A73-919C-21521F17FEF9");
     while (ReceiveMailFlag)
     {
         try
         {
             ReceiverMail _ReceiveMail = new ReceiverMail(Receiver);
             DecodeModel _Model = new DecodeModel();
             if (_ReceiveMail.Receive())
             {
                 if (_Model.SaveObjects(_ReceiveMail.ReceiverObjects))
                 {
                     _ReceiveMail.ClearReceiveMails();
                 }
                 if (_Model.DataChanged)
                 {
                     UpdateXmlConfigFlag();
                 }
             }
         }
         catch (Exception e)
         {
             WriteLog(e.Message);
         }
         Thread.Sleep(300000);
      }
 }
Esempio n. 2
0
 private static void ReceiveEmail()
 {
     Guid Receiver = Guid.Parse("31A9DE51-C207-4A73-919C-21521F17FEF9");
     ReceiverMail _ReceiveMail = new ReceiverMail(Receiver);
     DecodeModel _Model = new DecodeModel();
     if (_ReceiveMail.Receive())
     {
         if (_Model.SaveObjects(_ReceiveMail.ReceiverObjects))
         {
             _ReceiveMail.ClearReceiveMails();
         }
         if (_Model.DataChanged)
         {
             UpdateXmlConfigFlag();
         }
     }
 }
Esempio n. 3
0
        private void TestSaveOwnershipHistory()
        {
            string conn = "Server=.;Database=AFRP;Persist Security Info=True;User ID=UniCloud;Password=uni!cloud";

            TestData td = new TestData(conn);
            Guid gd = td.GetLastOwnershipHistory();

            EncodeModel _EModel = new EncodeModel(conn);
            var obj = _EModel.EncodeOwnershipHistory(gd);

            List<ReceiverObject> objList = new List<ReceiverObject>();
            ReceiverObject ro = new ReceiverObject();
            ro.Objects.Add(obj);
            objList.Add(ro);
            DecodeModel _Model = new DecodeModel();
            if (_Model.SaveObjects(objList))
            {
                if (_Model.DataChanged)
                {
               //     UpdateXmlConfigFlag();
                }
            }
        }