public ActionResult Edit(string id, Admin collection) { try { // TODO: Add update logic here AdminCEN cen = new AdminCEN(); cen.Modify(id, collection.Nombre, collection.Apellidos, collection.Password, collection.Direccion, collection.Tarjeta, collection.Imagen); //cen.New_(collection.Nombre, collection.Precio, collection.Descripcion, collection.Imagen, collection.Valor, collection.Stock, collection.Talla); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Edit(AdminViewModel admin)//int id, FormCollection collection || AdminViewModel admin || AdminEN adminEN { try { /* * AdminViewModel admin = new AssemblerAdmin().ConvertENToModelUI(adminEN); * AdminCEN adminCEN = new AdminCEN(); * adminCEN.Modify(admin.id, admin.Email, admin.Password, admin.FechaInscripcion); //Utils.Util.GetEncondeMD5 (p_pass); || LePapeoGenNHibernate.Utils.Util.GetEncondeMD5(admin.p_pass) * //return View(); * return RedirectToAction("Index"); */ AdminCEN pre = new AdminCEN(); AdminEN preEN = pre.ReadOID(admin.id); // TODO: Add update logic here AdminCEN cen = new AdminCEN(); cen.Modify(admin.id, admin.Email, preEN.Pass, admin.FechaInscripcion); return(RedirectToAction("Index")); /* * SessionInitialize(); * AdminCAD adminCAD = new AdminCAD(session); * AdminCEN adminCEN = new AdminCEN(); * adminCEN.Modify(admin.id, admin.email, admin.p_pass, admin.p_fecha_inscripcion); * SessionClose(); * return View(); */ //return RedirectToAction("PorCategoria", new { id = art.IdCategoria }); } catch { return(View()); } }