예제 #1
0
        /// <summary>
        /// The serialize person current.
        /// </summary>
        protected override void SerializePersonCurrent()
        {
            SerializeObject.EndPacket.CountMessages = SerializeObject.MessageCount().ToString(CultureInfo.InvariantCulture);

            // Сериализуем
            XmlSerializationHelper.SerializePersonErp(SerializeObject, GetFileNameFull());
            base.SerializePersonCurrent();

            // Пишем в базу код успешной выгрзуки
            var batch = ObjectFactory.GetInstance <IBatchManager>().GetById(BatchId);

            if (batch != null)
            {
                batch.CodeConfirm = ObjectFactory.GetInstance <IConceptCacheManager>().GetById(CodeConfirm.AA);
                ObjectFactory.GetInstance <IBatchManager>().SaveOrUpdate(batch);
                ObjectFactory.GetInstance <ISessionFactory>().GetCurrentSession().Flush();
            }
        }