Exemplo n.º 1
0
        // GET: InstallmentDecrease/Delete/5
        public ActionResult Delete(Nullable <int> id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            Db db = new Db(DbServices.ConnectionString);
            InstallmentDecrease installmentDecrease = InstallmentDecreaseServices.Get(id.Value, db);

            if (installmentDecrease == null)
            {
                return(HttpNotFound());
            }
            return(View(installmentDecrease));
        }
Exemplo n.º 2
0
        // GET: InstallmentDecrease/Edit/5
        public ActionResult Edit(Nullable <int> id)
        {
            Db db = new Db(DbServices.ConnectionString);

            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            InstallmentDecrease installmentDecrease = InstallmentDecreaseServices.Get(id.Value, db);

            if (installmentDecrease == null)
            {
                return(HttpNotFound());
            }

            ViewBag.EmployeeList = new SelectList(EmployeeServices.List(db), "Id", "FirstName", installmentDecrease.Employee);
            ViewBag.InstallmentDecreaseOrderList = new SelectList(InstallmentDecreaseOrderServices.List(db), "Id", "CersNumber", installmentDecrease.InstallmentDecreaseOrder);
            ViewBag.DepartmentList = new SelectList(DepartmentServices.List(db), "Id", "Name", installmentDecrease.Department);
            return(View(installmentDecrease));
        }