public ActionResult StockCardAction(long id, string status) { VoucherStatus vStatus = (VoucherStatus)Enum.Parse(typeof(VoucherStatus), status); ViewBag.vStatus = vStatus; //if (vStatus == VoucherStatus.Submited) //{ // var check = salesServices.CheckValidQty(id); // if (!check) // { // return Json(0, JsonRequestBehavior.AllowGet); // } //} salesServices.StockCardAction(vStatus, CurrenUser.Id, id); // var button = ModelExtensions.StockButtonAction(CurrenUser, vStatus, id); var model = salesServices.GetModelById(id); var statusview = this.RenderPartialView("_StatusView", model); return(Json(new { status = vStatus.ToString(), // button = button, view = statusview }, JsonRequestBehavior.AllowGet)); }