/*_____________________________________________*/ public ActionResult InsertarDepartamento() { DEPT dept = new DEPT(); dept.DEPT_NO = this.helper.GetMaximoDepartamento(); return(View(dept)); }
public ActionResult Update(DEPT dept, String aux = null) { if (ModelState.IsValid) { h.Update(dept); return(RedirectToAction("Index", "Scaffolding")); } return(View(dept)); }
public ActionResult Create(DEPT dept) { if (ModelState.IsValid) { h.Create(dept); return(RedirectToAction("Index", "Scaffolding")); } return(View(dept)); }
public ActionResult InsertarDepartamento(DEPT departamento) { departamento.DEPT_NO = this.helper.GetMaximoDepartamento(); if (ModelState.IsValid) { this.helper.InsertarDepartamento(departamento); return(View("Index")); } return(View(departamento)); }
protected void Button1_Click(object sender, EventArgs e) { DEPT dept = new DEPT(); dept.DEPT_NO = int.Parse(this.txtNumero.Text); dept.DNOMBRE = this.txtNumero.Text; dept.LOC = this.txtLocalidad.Text; this.contexto.DEPT.InsertOnSubmit(dept); this.contexto.SubmitChanges(); this.CargarDepartamentos(); }
public ActionResult Detalle(int Depno) { DEPT dep = modelo.BuscarDept(Depno); return(View(dep)); }
//GET: Update public ActionResult Update(DEPT dept) { return(View(dept)); }
// PUT: api/Departamentos/5 //MODIFICAR DEPARTAMENTO public void Put(int id, DEPT dept) { modelo.ModificarDepartamento(id, dept.DNOMBRE , dept.LOC); }
// POST: api/Departamentos // POST: api/Departamentos/11/NOMBRE/LOCALIDAD //void Post(int num, String nom, String loc) //INSERTAR DEPARTAMENTO public void Post(DEPT dept) { modelo.InsertarDepartamento(dept.DEPT_NO, dept.DNOMBRE , dept.LOC); }