Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(string id)
        {
            alu alu = db.alu.Find(id);

            db.alu.Remove(alu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "carnet,apellido1,apellido2,apellido3,nombre1,nombre2,cod_carr,activo,curso_asp,proceso,fecha_pro,fecha_nac,dui,nit,recibo_ins,ciclo_in,año_in,cod_carr_old,carnet_old,equi,sexo")] alu alu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(alu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(alu));
 }
Ejemplo n.º 3
0
        // GET: alus/Edit/5
        public ActionResult Edit(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            alu alu = db.alu.Find(id);

            if (alu == null)
            {
                return(HttpNotFound());
            }
            return(View(alu));
        }
Ejemplo n.º 4
0
        // GET: alus/Detalle/5
        public ActionResult Detalle(string id)
        {
            if (id == null)
            {
                //return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
                return(RedirectToAction("Index", "alus"));
            }
            alu alu = db.alu.Find(id);

            if (alu == null)
            {
                return(HttpNotFound());
            }
            return(View(alu));
        }
Ejemplo n.º 5
0
    public static void Main()
    {
        Console.WriteLine(alu.country);
        Console.WriteLine("\n");

        alu Intel = new alu(32, "Intel");
        Intel.Write_info();

        alu AMD = new alu(64, "AMD", "Athlon");
        AMD.Write_info();

        Console.WriteLine("What is the model of the Intel processors");
        Intel.Model = Console.ReadLine();

        Console.WriteLine("What is the architecture of the AMD? ");

        AMD.Architecture = Console.ReadLine();

        Console.WriteLine("\nNew information: \n");
        Intel.Write_info();
        AMD.Write_info();

        Console.WriteLine("Press any key to do nothing :)");
        Console.Read();
        Console.WriteLine();
        Intel.do_something();
        Console.WriteLine("");

        Console.WriteLine("What can the company do? ");
        AMD.do_something(Console.ReadLine());
    }