Esempio n. 1
0
        public JsonResult Deletemyapp(UCHome_App_My myapp)
        {
            string statuscode = "200";
            string msg        = "";

            if (ModelState.IsValid)
            {
                myapp.Downloads  = 0;
                myapp.Hits       = 0;
                myapp.AppOrder   = 9;
                myapp.STATUS     = "1";
                myapp.AppColor   = "3";
                myapp.AppFrom    = Guid.Empty;
                myapp.CreateTime = DateTime.Now;
                myapp.UserID     = loginId;
                try
                {
                    appbll.Addmyapp(myapp);
                }
                catch (Exception ex)
                {
                    statuscode = "500";
                    msg        = ex.ToString();
                }
            }
            JsonResult jr = new JsonResult {
                Data = new { statuscode, msg }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
Esempio n. 2
0
        public PartialViewResult Deletemyapp()
        {
            UCHome_App_My myapp = new UCHome_App_My();

            myapp.PKID = Guid.NewGuid();
            return(PartialView(myapp));
        }
Esempio n. 3
0
        public JsonResult Addmyappfromsys(Guid appid)
        {
            UCHome_App_System sysapp = appbll.getsysappbyid(appid);

            string        statuscode = "200";
            string        msg        = "";
            UCHome_App_My myapp      = appbll.sysappTomyapp(sysapp);

            myapp.UserID = loginId;
            try
            {
                appbll.Addmyapp(myapp);
                appbll.addappdownloads(sysapp);
            }
            catch (Exception ex)
            {
                statuscode = "500";
                msg        = ex.ToString();
            }
            JsonResult jr = new JsonResult {
                Data = new { statuscode, msg }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
Esempio n. 4
0
        public ActionResult MyAppRedirectPage(Guid id, Guid?MenuID)
        {
            if (user == null)
            {
                return(Redirect(Url.Action("Logout")));
            }
            UCHomeEntities uc  = new UCHomeEntities();
            UCHome_App_My  app = uc.UCHome_App_My.SingleOrDefault(u => u.PKID == id);

            if (app != null && app.AppTarget == "_blank")
            {
                return(Redirect(app.AppUrl));
            }
            MyAppCollection myapp = new MyAppCollection();

            myapp.myapp       = app;
            ViewBag.SelMenuID = MenuID;
            return(View("MyAppRedirectPage", myapp));
        }
Esempio n. 5
0
        public PartialViewResult Editmyapp(Guid appid)
        {
            UCHome_App_My myapp = appbll.getappbyid(appid);

            return(PartialView(myapp));
        }