Пример #1
0
        protected void Button1_Click2(object sender, EventArgs e)
        {
            var s = new Service1();
            var b = new Bike();

            int ID = Int32.Parse(IDBike.Text);

            b = s.FindBikeById(ID);

            Name.Text = b.Name;
            Category.Text = b.Category;
        }
Пример #2
0
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main()
        {
#if DEBUG
            Service1 myService = new Service1();
            myService.OnDebug();
            System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
#else
            ServiceBase[] ServicesToRun;
            ServicesToRun = new ServiceBase[]
            {
                new Service1()
            };
            ServiceBase.Run(ServicesToRun);
#endif
        }
Пример #3
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main()
 {
     #if DEBUG
     Service1 myService = new Service1();
     myService.OnDebug();
     System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
     #else
     ServiceBase[] ServicesToRun;
     ServicesToRun = new ServiceBase[]
     {
         new Service1()
     };
     ServiceBase.Run(ServicesToRun);
     #endif
 }