コード例 #1
0
 public JsonResult Delete(int ID)
 {
     try
     {
         var quo = _quotationService.GetById(ID);
         _quotationService.Delete(quo);
         return(Json(new { success = true, message = "Delete Successfully" }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new { success = false, message = ex.ToString() }, JsonRequestBehavior.AllowGet));
     }
 }
コード例 #2
0
        public ActionResult Delete(int id, FormCollection collection)
        {
            try
            {
                // TODO: Add delete logic here

                QuotationService.Delete(QuotationService.GetById(id));
                QuotationService.Commit();

                return(RedirectToAction("Index"));
            }
            catch
            {
                return(View());
            }
        }
コード例 #3
0
 public ActionResult DeleteConfirmed(Guid id)
 {
     quotationService.Delete(id);
     return(RedirectToAction("Index"));
 }