• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Service.OperationResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: GetAllOrderByName

 public List<object> GetAllOrderByName(string languageId, out OperationResult operationResult)
 {
     return Common.Instance.SelectList<NewsStatus>
         (null, out operationResult)
         .OrderBy(obj => obj.Name)
         .ToList<object>();
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:7,代码来源:NewsStatusService.cs


示例2: GetAll

 public List<object> GetAll(string languageId, out OperationResult operationResult)
 {
     return Common.Instance.SelectList<RssSource>
         (obj => obj.LanguageId == languageId, out operationResult)
         .OrderBy(obj => obj.CreateDate)
         .ToList<object>();
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:7,代码来源:RssSourceService.cs


示例3: GetAllOrderByName

 public List<object> GetAllOrderByName(string languageId, out OperationResult operationResult)
 {
     return Common.Instance.SelectList<RssProvider>
         (obj => obj.LanguageId == languageId, out operationResult)
         .OrderBy(obj => obj.Name)
         .ToList<object>();
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:7,代码来源:RssProviderService.cs


示例4: Delete

 public void Delete(Guid id, out OperationResult operationResult)
 {
     lock (Lock)
     {
         Common.Instance.Delete<EmailReceiver>
             (obj => obj.EmailReceiverId == id, out operationResult);
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:8,代码来源:EmailReceiverService.cs


示例5: Delete

 public void Delete(Guid id, out OperationResult operationResult)
 {
     lock (Lock)
     {
         Common.Instance.Delete<Registration>
             (obj => obj.RegistrationId == id, out operationResult);
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:8,代码来源:RegistrationService.cs


示例6: Delete

 public void Delete(string languageId, Guid id, out OperationResult operationResult)
 {
     lock (Lock)
     {
         Common.Instance.Delete<SpecialImageType>
             (obj => obj.SpecialImageTypeId == id && obj.LanguageId == languageId, out operationResult);
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:8,代码来源:SpecialImageTypeService.cs


示例7: Delete

 public void Delete(string languageId, Guid id, out OperationResult operationResult)
 {
     lock (Lock)
     {
         Common.Instance.Delete<VideoAlbum>
             (obj => obj.VideoAlbumId == id && obj.LanguageId == languageId, out operationResult);
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:8,代码来源:VideoAlbumService.cs


示例8: Delete

 public void Delete(string languageId, Guid id, out OperationResult operationResult)
 {
     lock (Lock)
     {
         Common.Instance.Delete<RssProvider>
             (obj => obj.RssProviderId == id && obj.LanguageId == languageId, out operationResult);
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:8,代码来源:RssProviderService.cs


示例9: Delete

 public void Delete(string languageId, Guid id, out OperationResult operationResult)
 {
     lock (Lock)
     {
         Common.Instance.Delete<NewsComment>
             (obj => obj.NewsCommentId == id && obj.LanguageId == languageId, out operationResult);
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:8,代码来源:NewsCommentService.cs


示例10: GetAll

 public List<object> GetAll(out OperationResult operationResult)
 {
     var list = new List<object>
                    {
                        new LanguageEntity {LanguageId = "vi-VN", Name = "Tiếng Việt"},
                        new LanguageEntity {LanguageId = "en-US", Name = "English"}
                    };
     operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
     return list;
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:10,代码来源:LanguageService.cs


示例11: GetIntValue

 public static int GetIntValue(string key, out OperationResult operationResult)
 {
     int outValue;
     if (!int.TryParse(ConfigurationManager.AppSettings[key], out outValue))
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Failure };
         return -1;
     }
     operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
     return outValue;
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:11,代码来源:ConfigurationAccess.cs


示例12: GetBoolValue

 public static bool GetBoolValue(string key, out OperationResult operationResult)
 {
     bool outValue;
     if (!bool.TryParse(ConfigurationManager.AppSettings[key], out outValue))
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Failure };
         return false;
     }
     operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
     return outValue;
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:11,代码来源:ConfigurationAccess.cs


示例13: GetAll

 public List<object> GetAll(string languageId, out OperationResult operationResult)
 {
     try
     {
         return Common.Instance.SelectList<Support>
             (obj => obj.LanguageId == languageId, out operationResult)
             .ToList<object>();
     }
     catch (Exception ex)
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Warning, Message = ex.Message + ex.StackTrace };
         return null;
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:14,代码来源:SupportService.cs


示例14: ValidateOperation

 /// <summary>
 /// For the simplicity of the development process, just use a simple function and 
 /// error display method.
 /// Config a special message type for Success case in the Page. (ADD/EDIT/DELETE ...)
 /// </summary>
 /// <param name="opResult"></param>
 /// <returns></returns>
 /// TODO: For method with special error return, use the switch case structure instead
 public bool ValidateOperation(OperationResult opResult)
 {
     switch (opResult.Type)
     {
         case OperationResult.ResultType.Success:
             return true;
         case OperationResult.ResultType.Failure:
             ShowAlert(AlertType.Error, MessageConstant.Error, MessageConstant.InternalError + "<br />" + opResult.Message);
             return false;
         default:
             ShowAlert(AlertType.Error, MessageConstant.Error, MessageConstant.InvalidCredential + "<br />" + opResult.Message);
             return false;
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:22,代码来源:BasePageBackEnd.cs


示例15: CountAll

 public int CountAll(out OperationResult operationResult)
 {
     try
     {
         var entities = DBMapManager.CreateInstance();
         operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
         return (from obj in entities.Registration
                 select obj).Count();
     }
     catch (Exception ex)
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Failure, Message = ex.StackTrace };
         return 0;
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:15,代码来源:RegistrationService.cs


示例16: CountByRoot

 public int CountByRoot(string languageId, out OperationResult operationResult)
 {
     try
     {
         var entities = DBMapManager.CreateInstance();
         operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
         return (from obj in entities.NewsCategory
                 where obj.LanguageId == languageId && (obj.ParrentId == Guid.Empty || !obj.ParrentId.HasValue)
                 select obj).Count();
     }
     catch (Exception ex)
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Failure, Message = ex.StackTrace };
         return 0;
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:16,代码来源:NewsCategoryService.cs


示例17: CountByParentId

 public int CountByParentId(string languageId, Guid parentId, out OperationResult operationResult)
 {
     try
     {
         var entities = DBMapManager.CreateInstance();
         operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
         return (from obj in entities.ProductCategory
                 where obj.LanguageId == languageId && obj.ParrentId == parentId
                 select obj).Count();
     }
     catch (Exception ex)
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Failure, Message = ex.StackTrace };
         return 0;
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:16,代码来源:ProductCategoryService.cs


示例18: CountAll

 public int CountAll(string languageId, out OperationResult operationResult)
 {
     try
     {
         var entities = DBMapManager.CreateInstance();
         operationResult = new OperationResult { Type = OperationResult.ResultType.Success };
         return (from obj in entities.VideoAlbum
                 where obj.LanguageId == languageId
                 select obj).Count();
     }
     catch (Exception ex)
     {
         operationResult = new OperationResult { Type = OperationResult.ResultType.Failure, Message = ex.StackTrace };
         return 0;
     }
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:16,代码来源:VideoAlbumService.cs


示例19: GetAll

 public List<object> GetAll(string languageId, out OperationResult operationResult)
 {
     return Common.Instance.SelectList<VideoAlbum>
         (obj => obj.LanguageId == languageId, out operationResult)
         .ToList<object>();
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:6,代码来源:VideoAlbumService.cs


示例20: GetBySupportTypeId

 public List<object> GetBySupportTypeId(string languageId, Guid SupportTypeId, out OperationResult operationResult)
 {
     return Common.Instance.SelectList<Support>
         (obj => obj.LanguageId == languageId && obj.SupportTypeId == SupportTypeId, out operationResult)
         .ToList<object>();
 }
开发者ID:Artnman,项目名称:Cloud,代码行数:6,代码来源:SupportService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Words.Document类代码示例发布时间:2022-05-24
下一篇:
C# Artemis.EntityWorld类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap