Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            conversion conversion = db.conversions.Find(id);

            db.conversions.Remove(conversion);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "ID,networkID,offerID,aff_source,aff_subid1,aff_subid2,aff_subid3,session_ip,payout,device_brand,device_model,device_os,time_install,country")] conversion conversion)
 {
     if (ModelState.IsValid)
     {
         db.Entry(conversion).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.networkID = new SelectList(db.networks, "ID", "networkName", conversion.networkID);
     return(View(conversion));
 }
Esempio n. 3
0
        // GET: conversions/Details/5

        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            conversion conversion = db.conversions.Find(id);

            if (conversion == null)
            {
                return(HttpNotFound());
            }
            return(View(conversion));
        }
Esempio n. 4
0
        // GET: conversions/Edit/5
        public ActionResult Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            conversion conversion = db.conversions.Find(id);

            if (conversion == null)
            {
                return(HttpNotFound());
            }
            ViewBag.networkID = new SelectList(db.networks, "ID", "networkName", conversion.networkID);
            return(View(conversion));
        }
Esempio n. 5
0
        delegate float conversion(float valor, float tasa); //Lambda Expression

        void datos2()
        {
            conversion r = (c, t) => c / t;// Lambda Expresion

            Console.WriteLine("Valor dolar: ");
            float d = Convert.ToSingle(Console.ReadLine());

            Console.WriteLine("Valor Euro: ");
            float e = Convert.ToSingle(Console.ReadLine());

            Console.WriteLine("Valor a convertir: ");
            float x = Convert.ToSingle(Console.ReadLine());

            Console.WriteLine("Dolar: " + r(x, d));
            Console.WriteLine("Euro: " + r(x, e));
            Console.ReadLine();
        }
Esempio n. 6
0
 internal SensorValue(string name, string unit, conversion convert)
 {
     this.name    = name;
     this.unit    = unit;
     this.convert = convert;
 }