Exemplo n.º 1
0
        //сохранение сообщения
        public String SSG(string m)
        {
            if (GarageClass.SaveDataStatusGaraj(m))
            {
                return("YES");
            }

            return("NO");
        }
Exemplo n.º 2
0
        //сохранение температуры

        public String STG(string t1, string t2, string hum)
        {
            if (t1 != "" && t2 != "" && hum != "")
            {
                if (GarageClass.SaveDataTempGaraj(t1, t2, hum))
                {
                    return("YES");
                }
            }

            return("NO");
        }
Exemplo n.º 3
0
        public IActionResult Index(int SCntV)
        {
            if (SCntV <= 0)
            {
                SCntV = 100;
            }
            ViewData["rmenu"]        = 1;
            ViewData["MassDataTemp"] = GarageClass.GetDataForView(SCntV, out int cntOllLine);
            ViewData["cntOllLine"]   = cntOllLine;
            ViewData["SCntV"]        = SCntV;

            return(View());
        }
Exemplo n.º 4
0
        static void Main(string[] args)
        {
            //Cree un garaje
            GarageClass garage = new GarageClass();

            //Cree 2 coches
            VehiculeClass coche1 = new VehiculeClass("Toyota", "Corolla");
            VehiculeClass coche2 = new VehiculeClass("Honda", "Civic");

            var rand = new Random();

            //Agregar Coche
            garage.checkin(coche1, "aceite");
            coche1.incOilConsumption();
            coche1.incFixTotal(rand.Next(100, 1000));
            garage.chekout();

            garage.checkin(coche2, "aceite");
            coche1.incOilConsumption();
            coche2.incFixTotal(rand.Next(100, 1000));
            garage.chekout();

            garage.checkin(coche2, "Frenos");
            coche2.incFixTotal(rand.Next(100, 1000));
            garage.chekout();

            garage.checkin(coche2, "Transmision");
            coche2.incFixTotal(rand.Next(100, 1000));
            garage.chekout();

            garage.checkin(coche1, "Bomba");
            coche1.incFixTotal(rand.Next(100, 1000));
            garage.chekout();



            Console.WriteLine("{0} - {1}: Total Gastado->{2}", coche1.brand, coche1.model, coche1.fixesAmountTotal);
            Console.WriteLine("{0} - {1}: Total Gastado->{2}", coche2.brand, coche2.model, coche2.fixesAmountTotal);
        }