Пример #1
0
        /// <summary>
        /// What to do before save any edit or newly created record
        /// </summary>
        /// <param name="endorse"></param>
        private void _doBeforePost(Endorse endorse, bool isCreate)
        {
            endorse.ClearNullDate();
            endorse.UpdateInfo.LogUpdated(CurrentUserName);
            if (endorse.Alien != null)
            {
                endorse.Alien.UpdateInfo.LogUpdated(CurrentUserName);
            }

            if (isCreate)
            {
                if (endorse.Alien != null)
                {
                    endorse.Alien.DataInType = 3; //endorse
                    endorse.PassportCard.CopyFrom(endorse.Alien.PassportCard);
                    endorse.HabitatCard.CopyFrom(endorse.Alien.HabitatCard);
                    endorse.CurrentAddress.CopyFrom(endorse.Alien.CurrentAddress);
                }
            }
        }