Esempio n. 1
0
        /// <summary>
        /// Определить Id владельца (если id нет в системе RailCars создать из данных КИС)
        /// </summary>
        /// <param name="id_sob_kis"></param>
        /// <param name="id_owner_country"></param>
        /// <returns></returns>
        public int?DefinitionIDOwner(int id_sob_kis, int?id_owner_country)
        {
            int?id_own = rs_own.GetIDOwnersOfKis(id_sob_kis);

            if (id_own == null)
            {
                KometaSobstvForNakl sfn = kc.GetSobstvForNakl(id_sob_kis);
                if (sfn != null)
                {
                    int res = rs_own.SaveOwners(new OWNERS()
                    {
                        id_owner    = 0,
                        name        = sfn.NPLAT,
                        abr         = sfn.ABR,
                        id_country  = id_owner_country,
                        id_ora      = id_sob_kis,
                        id_ora_temp = null,
                    });
                    if (res > 0)
                    {
                        id_own = res;
                    }
                }
            }
            return(id_own);
        }
Esempio n. 2
0
        public void Test_KometaContent_KometaSobstvForNakl()
        {
            KometaContent kom_con = new KometaContent();

            foreach (KometaSobstvForNakl t in kom_con.GetSobstvForNakl())
            {
                WL(t);
            }
        }
Esempio n. 3
0
        public void Test_KometaContent_KometaSobstvForNakl(int sob)
        {
            KometaContent kom_con = new KometaContent();

            WL(kom_con.GetSobstvForNakl(sob));
        }