Beispiel #1
0
        public ActionResult Remote(int stateId)
        {
            //System.Threading.Thread.Sleep(2000);  // имитация сетевой задержки

            var vm         = VMData.Create();
            int validValue = 3;        // код ЧП

            if (stateId != validValue) // только не ЧП
            {
                return(Json(new { status = "success" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                throw new HttpException(string.Format("remote validation -> не возможно {0}", vm.ListState.First(s => s.Value == validValue.ToString()).Text));
            }
        }
Beispiel #2
0
 public ActionResult Edit()
 {
     return(View(VMData.Create()));
 }