예제 #1
0
        public JsonResult AddApp(UCHome_AppType_Relation relation, UCHome_App_System sysapp)
        {
            UCHome_AppBLL appbll     = new UCHome_AppBLL();
            string        statuscode = "200";
            string        msg        = "";

            try {
                sysapp.Downloads  = 0;
                sysapp.Hits       = 0;
                sysapp.STATUS     = "1";
                sysapp.AppColor   = "1";
                sysapp.CreateTime = DateTime.Now;
                appbll.Addsystemapp(sysapp);
                relation.AppID = sysapp.PKID;
                relation.PKID  = Guid.NewGuid();
                appbll.AddRelation_App_Type(relation);
            }
            catch (Exception) {
                statuscode = "500";
                msg        = "操作失败,请重试!";
                throw;
            }
            JsonResult jr = new JsonResult {
                Data = new { statuscode, msg }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
예제 #2
0
        public JsonResult DeleteApp(Guid pkid)
        {
            UCHome_AppBLL appbll     = new UCHome_AppBLL();
            string        statuscode = "200";
            string        msg        = "";

            if (appbll.IsExistChildappmenu(pkid))
            {
                statuscode = "300";
                msg        = "抱歉,该项存在子功能,将不允许删除";
            }
            else
            {
                try {
                    appbll.Deletesystemapp(pkid);
                }
                catch (Exception) {
                    statuscode = "500";
                    msg        = "操作失败,请重试!";
                    throw;
                }
            }

            JsonResult jr = new JsonResult {
                Data = new { statuscode, msg }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public JsonResult GetAppmenus(Guid parentAppid)
        {
            UCHome_AppBLL appbll = new UCHome_AppBLL();
            IEnumerable <UCHome_App_Menu> appmenulist = appbll.getappmenulist(parentAppid);

            return(Json(appmenulist, JsonRequestBehavior.AllowGet));
        }
예제 #4
0
        public JsonResult GetSysApp()
        {
            UCHome_AppBLL appbll = new UCHome_AppBLL();
            IEnumerable <UCHome_App_System> applist = appbll.getsysapplist();

            return(Json(applist, JsonRequestBehavior.AllowGet));
        }
예제 #5
0
        public JsonResult GetRoleList(string roleType)
        {
            UCHome_AppBLL appbll = new UCHome_AppBLL();
            var           result = appbll.GetRoleList(roleType);

            return(Json(result, JsonRequestBehavior.AllowGet));
        }
예제 #6
0
        public JsonResult DeleteAppmenu(Guid pkid)
        {
            UCHome_AppBLL appbll     = new UCHome_AppBLL();
            string        statuscode = "200";
            string        msg        = "";

            try {
                appbll.DeleteAppmenu(pkid);
            }
            catch (Exception) {
                statuscode = "500";
                msg        = "操作失败,请重试!";
                throw;
            }
            JsonResult jr = new JsonResult {
                Data = new { statuscode, msg }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
예제 #7
0
        public JsonResult MoveApp(Guid pkid, string appstatus)
        {
            UCHome_AppBLL     appbll     = new UCHome_AppBLL();
            string            statuscode = "200";
            string            msg        = "";
            UCHome_App_System newapp;

            try {
                newapp = appbll.Removesystemapp(pkid, appstatus);
            }
            catch (Exception) {
                statuscode = "500";
                msg        = "操作失败,请重试!";
                throw;
            }
            JsonResult jr = new JsonResult {
                Data = new { statuscode, newapp }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
예제 #8
0
        public JsonResult AddAppmenu(UCHome_App_Menu newappmenu)
        {
            UCHome_AppBLL appbll     = new UCHome_AppBLL();
            string        statuscode = "200";
            string        msg        = "";

            try {
                newappmenu.IsMyOrSystem = "1";
                appbll.Addappmenu(newappmenu);
            }
            catch (Exception) {
                statuscode = "500";
                msg        = "操作失败,请重试!";
                throw;
            }
            JsonResult jr = new JsonResult {
                Data = new { statuscode, msg }
            };

            return(Json(jr, JsonRequestBehavior.AllowGet));
        }
예제 #9
0
        public void AddUseToRole(string oldIds, string Ids, Guid roleId, string names)
        {
            UCHome_AppBLL appbll = new UCHome_AppBLL();

            appbll.addUseToRole(oldIds, Ids, roleId, names);
        }