Beispiel #1
0
        //
        // GET: /Home/

        public ActionResult Index()
        {
            GraphValidationModel model = new GraphValidationModel();

            APKContext.GenerateAPKList();
            return(View(model));
        }
Beispiel #2
0
        public JsonResult GenerateAPK(bool all, int id)
        {
            List <APK> lst = APKContext.GenerateAPKList();
            JsonResult jr;

            if (all)
            {
                jr = Json(lst, JsonRequestBehavior.AllowGet);
            }
            else
            {
                APK tmp = lst.Where(apk => apk.ID == id).FirstOrDefault();
                if (tmp == null)
                {
                    tmp = new APK()
                    {
                        ID = -1
                    }
                }
                ;
                jr = Json(tmp, JsonRequestBehavior.AllowGet);
            }
            return(jr);
        }