コード例 #1
0
        /*_____________________________________________*/
        public ActionResult InsertarDepartamento()
        {
            DEPT dept = new DEPT();

            dept.DEPT_NO = this.helper.GetMaximoDepartamento();
            return(View(dept));
        }
コード例 #2
0
 public ActionResult Update(DEPT dept, String aux = null)
 {
     if (ModelState.IsValid)
     {
         h.Update(dept);
         return(RedirectToAction("Index", "Scaffolding"));
     }
     return(View(dept));
 }
コード例 #3
0
 public ActionResult Create(DEPT dept)
 {
     if (ModelState.IsValid)
     {
         h.Create(dept);
         return(RedirectToAction("Index", "Scaffolding"));
     }
     return(View(dept));
 }
コード例 #4
0
 public ActionResult InsertarDepartamento(DEPT departamento)
 {
     departamento.DEPT_NO = this.helper.GetMaximoDepartamento();
     if (ModelState.IsValid)
     {
         this.helper.InsertarDepartamento(departamento);
         return(View("Index"));
     }
     return(View(departamento));
 }
コード例 #5
0
    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();
    }
コード例 #6
0
        public ActionResult Detalle(int Depno)
        {
            DEPT dep = modelo.BuscarDept(Depno);

            return(View(dep));
        }
コード例 #7
0
 //GET: Update
 public ActionResult Update(DEPT dept)
 {
     return(View(dept));
 }
コード例 #8
0
 // PUT: api/Departamentos/5
 //MODIFICAR DEPARTAMENTO
 public void Put(int id, DEPT dept)
 {
     modelo.ModificarDepartamento(id, dept.DNOMBRE
                                  , dept.LOC);
 }
コード例 #9
0
 // 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);
 }