public ActionResult Index() { //Listamos todas los laboratorios en una tabla DataTable listLaboratorio = DLaboratorio.listarLaboratorios(); return(View(listLaboratorio)); }
public void editarLaboratorio(string id, string nombre) { DLaboratorio Obj = new DLaboratorio(); Obj.Id = id; Obj.Nombre = nombre; Obj.editar(Obj); }
public ActionResult Edit(Laboratorio lab) { try { var conf1 = DLaboratorio.acutalizarLaboratorio(lab); ViewBag.confirmacionAL = conf1; return(View()); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e); return(View()); } }
public ActionResult Create(Laboratorio lab) { try { // TODO: Add insert logic here var conf = DLaboratorio.insertarLaboratorio(lab); ViewBag.confirmacionL = conf; return(View()); } catch { return(View()); } }
// GET: Laboratorio/Delete/5 public ActionResult Edit(int id) { DataTable dtLab = DLaboratorio.obtenerLaboratorio(id); if (dtLab.Rows.Count == 1) { Laboratorio objLab = new Laboratorio(); objLab.IdLaboratorio = Convert.ToInt32(dtLab.Rows[0][0].ToString()); objLab.ClaveLaboratorio = Convert.ToString(dtLab.Rows[0][1].ToString()); objLab.Nombre = Convert.ToString(dtLab.Rows[0][2].ToString()); return(View(objLab)); } else { return(RedirectToAction("Index")); } }
public ActionResult Delete(int id) { System.Diagnostics.Debug.WriteLine(DLaboratorio.bajaLaboratorio(id)); return(RedirectToAction("Index")); }