コード例 #1
0
        /// <summary>
        /// Определить id цеха (если id нет в системе RailCars создать из данных КИС)
        /// </summary>
        /// <param name="id_shop_kis"></param>
        /// <returns></returns>
        public int?DefinitionIDShop(int id_shop_kis)
        {
            int?id_shop = rs_shp.GetIDShopsOfKis(id_shop_kis);

            if (id_shop == null)
            {
                PromCex cex = pc.GetCex(id_shop_kis);
                if (cex != null)
                {
                    int res = rs_shp.SaveShop(new SHOPS()
                    {
                        id_shop   = 0,
                        name      = cex.ABREV_P,
                        name_full = cex.NAME_P,
                        id_stat   = null,
                        id_ora    = id_shop_kis
                    });
                    if (res > 0)
                    {
                        id_shop = res;
                    }
                }
            }
            return(id_shop);
        }
コード例 #2
0
 public void WL(PromCex t)
 {
     if (t == null)
     {
         Console.WriteLine(" = Null"); return;
     }
     Console.WriteLine("K_PODR: {0},\t NAME_P: {1},\t ABREV_P: {2}",
                       t.K_PODR, t.NAME_P, t.ABREV_P);
 }