Пример #1
0
        public ActionResult Refund(Refund r)
        {
            bool   success = false;
            string message = "";

            r.refundDate = DateTime.Now;
            r.refundTime = DateTime.Now.ToShortTimeString();
            if (r.AddRefundRequest())
            {
                success = true;
                message = "Request Added Successfully";
            }
            else
            {
                success = false;
                message = "Refund request Failed";
            }
            return(Json(new { success = success, message = message }, JsonRequestBehavior.AllowGet));
        }