Exemplo n.º 1
0
        //Get: PayingBy/Delete
        public ActionResult Delete(int id)
        {
            var service  = new PayingByService();
            var category = service.GetPayingBy(id);

            return(View(category));
        }
Exemplo n.º 2
0
        //Get: PayingBy/Edit/{id}
        public ActionResult Edit(int id)
        {
            var service  = new PayingByService();
            var detail   = service.GetPayingBy(id);
            var payingBy = new PayingByEdit()
            {
                CashOrCard = detail.CashOrCard
            };

            return(View(payingBy));
        }
Exemplo n.º 3
0
        public ActionResult DeletePost(int id)
        {
            var service = new PayingByService();

            if (service.DeletePayingBy(id))
            {
                TempData["SaveResult"] = "Paymnent Deleted";
                return(RedirectToAction("Index"));
            }
            ModelState.AddModelError("", "Paymnet could not be updated");
            var model = service.GetPayingBy(id);

            return(View(model));
        }