当前位置: 首页>>代码示例>>C#>>正文


C# Model.ExecResult类代码示例

本文整理汇总了C#中WKT.Model.ExecResult的典型用法代码示例。如果您正苦于以下问题:C# ExecResult类的具体用法?C# ExecResult怎么用?C# ExecResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ExecResult类属于WKT.Model命名空间,在下文中一共展示了ExecResult类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DelDictValue

 public ExecResult DelDictValue(DictValueQuery query)
 {
     ExecResult execResult = new ExecResult();
     IDictValueService service = ServiceContainer.Instance.Container.Resolve<IDictValueService>();
     Int64[] dictValueIDs = query.DictValueIDs;
     if (dictValueIDs == null)
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "没有删除任何数据!";
         return execResult;
     }
     string msg = string.Empty;
     bool result = service.BatchDeleteDictValue(dictValueIDs);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "删除数据字典成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "删除数据字典失败!";
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:DictAPIController.cs

示例2: Del

 public ExecResult Del(SiteResourceQuery query)
 {
     ExecResult execResult = new ExecResult();
     ISiteResourceService service = ServiceContainer.Instance.Container.Resolve<ISiteResourceService>();
     Int64[] ResourceIDs = query.ResourceIDs;
     if (ResourceIDs == null)
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "没有删除任何数据!";
         return execResult;
     }
     string msg = string.Empty;
     bool result = service.BatchDeleteSiteResource(ResourceIDs);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "删除资源文件成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "删除资源文件失败!";
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:SiteResourceAPIController.cs

示例3: DelApply

 /// <summary>
 /// 删除专家申请信息
 /// </summary>
 /// <param name="expertApplyEntity"></param>
 /// <returns></returns>
 public ExecResult DelApply(long PKID)
 {
     ExecResult result = new ExecResult();
     try
     {
         IExpertApplyService service = ServiceContainer.Instance.Container.Resolve<IExpertApplyService>();
         bool flag = service.DelApply(PKID);
         if (flag)
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "删除成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "删除失败";
         }
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "删除专家申请时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:30,代码来源:ExpertApplyAPIController.cs

示例4: Del

 public ExecResult Del(MessageTemplateQuery query)
 {
     ExecResult execResult = new ExecResult();
     IMessageTemplateService service = ServiceContainer.Instance.Container.Resolve<IMessageTemplateService>();
     Int64[] TemplateIDs = query.TemplateIDs;
     if (TemplateIDs == null)
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "没有删除任何数据!";
         return execResult;
     }
     string msg = query.TType == 2 ? "短信模版" : "邮件模版";
     bool result = service.BatchDeleteMessageTemplate(TemplateIDs);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "删除" + msg + "成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "删除" + msg + "失败!";
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:MessageTemplateAPIController.cs

示例5: DeleteRoleAuthor

 /// <summary>
 /// 从存储媒介中删除对象
 /// </summary>
 /// <param name="mapID"></param>
 /// <returns></returns>
 public ExecResult DeleteRoleAuthor(long mapID)
 {
     IRoleAuthorService service = ServiceContainer.Instance.Container.Resolve<IRoleAuthorService>();
     ExecResult result = new ExecResult();
     try
     {
         IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve<IRoleAuthorService>();
         bool flag = roleAuthorService.DeleteRoleAuthor(mapID);
         if (flag)
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "操作失败";
         }
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "删除角色作者信息时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:31,代码来源:RoleAuthorAPIController.cs

示例6: DeleteLoginErrorLog

 public ExecResult DeleteLoginErrorLog(LoginErrorLogQuery loginErrorLogQuery)
 {
     ExecResult result = new ExecResult();
     try
     {
         ILoginService loginService = ServiceContainer.Instance.Container.Resolve<ILoginService>();
         bool flag = loginService.DeleteLoginErrorLog(loginErrorLogQuery);
         if( flag )
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "操作失败,请确认登录信息是否正确";
         }
     }
     catch( Exception ex )
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "记录登录错误日志信息时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:LoginAPIController.cs

示例7: Del

 public ExecResult Del(ContactWayQuery query)
 {
     ExecResult execResult = new ExecResult();
     IContactWayService service = ServiceContainer.Instance.Container.Resolve<IContactWayService>();
     Int64[] ContactIDs = query.ContactIDs;
     if (ContactIDs == null)
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "没有删除任何数据!";
         return execResult;
     }
     string msg = string.Empty;
     bool result = service.BatchDeleteContactWay(ContactIDs);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "删除联系人成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "删除联系人失败!";
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:ContantWayAPIController.cs

示例8: AddFlowStatus

 public ExecResult AddFlowStatus(FlowStep flowStepEntity)
 {
     ExecResult result = new ExecResult();
     try
     {
         IFlowStatusService flowStatusService = ServiceContainer.Instance.Container.Resolve<IFlowStatusService>();
         bool flag = flowStatusService.AddFlowStatus(flowStepEntity);
         if (flag)
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "添加审稿状态失败,请确认信息是否正确";
         }
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "添加审稿状态时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:FlowAPIController.cs

示例9: AddAurhorRole

        public ActionResult AddAurhorRole(long RoleID, long[] IDAarry)
        {
            ExecResult execResult = new ExecResult();

            try
            {
                foreach (long AuthorID in IDAarry)
                {
                    RoleAuthorEntity roleAuthorEntity = new RoleAuthorEntity();
                    roleAuthorEntity.AuthorID = AuthorID;
                    roleAuthorEntity.RoleID = RoleID;
                    roleAuthorEntity.JournalID = JournalID;
                    IAuthorFacadeService authorService = ServiceContainer.Instance.Container.Resolve<IAuthorFacadeService>();
                    execResult = authorService.SetAurhorRole(roleAuthorEntity);
                    if (execResult.result == EnumJsonResult.error.ToString() || execResult.result == EnumJsonResult.failure.ToString())
                    {
                        break;
                    }
                }
            }
            catch (Exception ex)
            {
                execResult.result = EnumJsonResult.error.ToString();
                execResult.msg = "添加用户到当前角色出现异常:" + ex.Message;
                WKT.Log.LogProvider.Instance.Error("添加用户到当前角色出现异常:" + ex.Message);
            }

            return Content(JsonConvert.SerializeObject(execResult));
        }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:29,代码来源:MemberController.cs

示例10: DelAurhoRole

 public ExecResult DelAurhoRole(RoleAuthorEntity roleAuthorEntity)
 {
     ExecResult result = new ExecResult();
     try
     {
         IRoleAuthorService roleAuthorService = ServiceContainer.Instance.Container.Resolve<IRoleAuthorService>();
         bool flag = roleAuthorService.DeleteRoleAuthor(roleAuthorEntity);
         if (flag)
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "删除作者角色失败,请确认作者信息是否正确";
         }
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "删除作者角色时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:AuthorAPIController.cs

示例11: Del

 public ExecResult Del(FriendlyLinkQuery query)
 {
     ExecResult execResult = new ExecResult();
     IFriendlyLinkService service = ServiceContainer.Instance.Container.Resolve<IFriendlyLinkService>();
     Int64[] LinkIDs = query.LinkIDs;
     if (LinkIDs == null)
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "没有删除任何数据!";
         return execResult;
     }
     string msg = string.Empty;
     bool result = service.BatchDeleteFriendlyLink(LinkIDs);
     if (result)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "删除友情链接成功!";
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "删除友情链接失败!";
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:FriendlyLinkAPIController.cs

示例12: DeleteMember

 public ExecResult DeleteMember(AuthorInfoQuery authorQuery)
 {
     ExecResult result = new ExecResult();
     try
     {
         IAuthorInfoService authorService = ServiceContainer.Instance.Container.Resolve<IAuthorInfoService>();
         bool flag = authorService.BatchDeleteAuthorInfo(authorQuery);
         if (flag)
         {
             result.result = EnumJsonResult.success.ToString();
             result.msg = "成功";
         }
         else
         {
             result.result = EnumJsonResult.failure.ToString();
             result.msg = "删除编辑部成员信息失败,请确认成员信息是否正确";
         }
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "删除编辑部成员信息时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:25,代码来源:AuthorAPIController.cs

示例13: DelRole

 public ExecResult DelRole(RoleInfoQuery queryRole)
 {
     ExecResult execResult = new ExecResult();
     IRoleInfoService roleService = ServiceContainer.Instance.Container.Resolve<IRoleInfoService>();
     try
     {
         bool flag = roleService.BatchDeleteRoleInfo(queryRole);
         if (flag)
         {
             execResult.result = EnumJsonResult.success.ToString();
             execResult.msg = "删除角色成功";
         }
         else
         {
             execResult.result = EnumJsonResult.failure.ToString();
             execResult.msg = "删除角色失败,请检查输入的角色信息";
         }
     }
     catch (Exception ex)
     {
         execResult.result = EnumJsonResult.error.ToString();
         execResult.msg = "删除角色信息时出现异常:" + ex.Message;
         WKT.Log.LogProvider.Instance.Error("删除角色信息时出现异常:" + ex.Message);
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:26,代码来源:SystemAPIController.cs

示例14: DelDict

 public ExecResult DelDict(DictQuery query)
 {
     ExecResult execResult = new ExecResult();
     IDictService service = ServiceContainer.Instance.Container.Resolve<IDictService>();
     IList<Int64> dictIDs = query.DictIDs.ToList();
     if (dictIDs == null)
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "没有删除任何数据!";
         return execResult;
     }
     string msg = string.Empty;
     IList<Int64> list = service.BatchDeleteDict(dictIDs);
     if (list == null || list.Count < dictIDs.Count)
     {
         execResult.result = EnumJsonResult.success.ToString();
         execResult.msg = "删除数据字典成功!";
         if (list != null && list.Count > 0)
             execResult.msg += string.Format("部分编号[{0}]由于存在数据字典值,请先删除", string.Join(",", list));
     }
     else
     {
         execResult.result = EnumJsonResult.failure.ToString();
         execResult.msg = "删除数据字典失败!";
     }
     return execResult;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:27,代码来源:DictAPIController.cs

示例15: DeleteContribute

 public ExecResult DeleteContribute(List<ContributionInfoQuery> cEntityList)
 {
     ExecResult result = new ExecResult();
     try
     {
         IContributionInfoService cService = ServiceContainer.Instance.Container.Resolve<IContributionInfoService>();
         foreach (ContributionInfoQuery cQuery in cEntityList)
         {
             bool flag = cService.UpdateContributionStatus(cQuery);
             if (!flag)
             {
                 result.result = EnumJsonResult.failure.ToString();
                 result.msg = "删除稿件失败:" + cQuery.CID.ToString();
                 return result;
             }
         }
         result.result = EnumJsonResult.success.ToString();
         result.msg = "删除稿件成功";
     }
     catch (Exception ex)
     {
         result.result = EnumJsonResult.error.ToString();
         result.msg = "删除稿件时出现异常:" + ex.Message;
     }
     return result;
 }
开发者ID:zhanglc8801,项目名称:WKT2015,代码行数:26,代码来源:ContributionAPIController.cs


注:本文中的WKT.Model.ExecResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。