// // GET: /Soporte/Create public ActionResult Create(String ttl, String txt) { SoporteModelo sprt = new SoporteModelo(); sprt.titulo = ttl; sprt.texto = txt; return(View(sprt)); }
public ActionResult Create(SoporteModelo sprt) { var userName2 = System.Web.HttpContext.Current.User.Identity.Name; SoporteCEN cen = new SoporteCEN(); cen.NuevaConsulta(userName2, sprt.titulo, sprt.texto); return(RedirectToAction("../Home/Index")); }
// // GET: /Soporte/Edit/5 public ActionResult Edit(int id) { SoporteModelo sprt = null; SessionInitialize(); SoporteEN sprtEN = new SoporteCAD(session).ReadOIDDefault(id); sprt = new AssemblerSoporte().ConvertENToModelUI(sprtEN); SessionClose(); return(View(sprt)); }
public ActionResult Edit(int id, SoporteModelo spr, FormCollection collection) { try { SoporteCEN sprtCEN = new SoporteCEN(); sprtCEN.Responder(id, spr.titulo, spr.texto, spr.respuesta); return(RedirectToAction("Index")); } catch { return(View()); } }
public ActionResult Create(SoporteModelo sprt, Usuario usr, HttpPostedFileBase file) { string filename = "", pathh = ""; if (file != null && file.ContentLength > 0) { filename = Path.GetFileName(file.FileName); pathh = Path.Combine(Server.MapPath("~/Images/Uploads"), filename); file.SaveAs(pathh); } try { filename = "*images/uploads/" + filename; SoporteCEN sprtCEN = new SoporteCEN(); sprtCEN.NuevaConsulta(usr.email, sprt.titulo, sprt.texto); return(RedirectToAction("Create", new { id = usr.email })); } catch { return(View()); } }
// // GET: /Soporte/Create public ActionResult Create() { SoporteModelo sprt = new SoporteModelo(); return(View(sprt)); }