コード例 #1
0
        // GET: Users/Delete/5
        public ActionResult Delete(long id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            expense exp = _repo.ExpenseFind(id);

            ExpenseCreateVM model = new ExpenseCreateVM()
            {
                id           = exp.id,
                name         = exp.name,
                description  = exp.description,
                expense_id   = exp.expense_id,
                date_expense = (DateTime)exp.date_expense,
            };

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

            ViewBagDetail(model.expense_id);

            return(View(model));
        }