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)); }
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)); }
public JsonResult GetAppmenus(Guid parentAppid) { UCHome_AppBLL appbll = new UCHome_AppBLL(); IEnumerable <UCHome_App_Menu> appmenulist = appbll.getappmenulist(parentAppid); return(Json(appmenulist, JsonRequestBehavior.AllowGet)); }
public JsonResult GetSysApp() { UCHome_AppBLL appbll = new UCHome_AppBLL(); IEnumerable <UCHome_App_System> applist = appbll.getsysapplist(); return(Json(applist, JsonRequestBehavior.AllowGet)); }
public JsonResult GetRoleList(string roleType) { UCHome_AppBLL appbll = new UCHome_AppBLL(); var result = appbll.GetRoleList(roleType); return(Json(result, JsonRequestBehavior.AllowGet)); }
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)); }
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)); }
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)); }
public void AddUseToRole(string oldIds, string Ids, Guid roleId, string names) { UCHome_AppBLL appbll = new UCHome_AppBLL(); appbll.addUseToRole(oldIds, Ids, roleId, names); }