示例#1
0
        /// <summary>
        /// 请求获取实体【失败则返回实体默认值】
        /// </summary>
        /// <typeparam name="T">实体类型</typeparam>
        /// <param name="request">请求参数</param>
        /// <returns></returns>
        public T PostForResultVo <T>(RequestBase request)
        {
            JsonResponses resultObject = PostForVo(request);

            if (resultObject.ValidateResponses() && resultObject != null)
            {
                return(resultObject.GetDataValue <T>());
            }
            return(default(T));
        }
        public JsonResult GetPsOrganizationInfo(int id)
        {
            PsOrganization Info      = new PsOrganization();
            JsonResponses  responses = organizationSdk.GetPsOrganizationInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <PsOrganization>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
示例#3
0
        public JsonResult GetRtMessageInfo(int id)
        {
            RtMessage     Info      = new RtMessage();
            JsonResponses responses = messageSDK.GetInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <RtMessage>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetBsDictionaryTypeInfo(int id)
        {
            BsDictionaryType Info      = new BsDictionaryType();
            JsonResponses    responses = dictionaryTypeSDK.GetInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <BsDictionaryType>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetRtPushconfigInfo(int id)
        {
            RtPushconfig  Info      = new RtPushconfig();
            JsonResponses responses = pushConfigSDK.GetInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <RtPushconfig>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
示例#6
0
        public JsonResult GetPsRolesInfo(int id)
        {
            PsRoles       Info      = new PsRoles();
            JsonResponses responses = rolesSDK.GetPsRolesInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <PsRoles>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
示例#7
0
        public JsonResult GetPdProjectInfo(int id)
        {
            PdProject     Info      = new PdProject();
            JsonResponses responses = serverSdk.GetInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <PdProject>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
        public JsonResult GetPsManagementInfo(int id)
        {
            PsManagement  Info      = new PsManagement();
            JsonResponses responses = managementSDK.GetPsManagementInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <PsManagement>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }
示例#9
0
        public JsonResult GetPsMenuInfo(int id)
        {
            PsMenu        Info      = new PsMenu();
            JsonResponses responses = menuSdk.GetPsMenuInfo(id);

            if (responses.code == JsonResponses.SuccessCode)
            {
                Info = responses.GetDataValue <PsMenu>();
            }
            return(Json(Info, JsonRequestBehavior.AllowGet));
        }