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


C# Service.OperationResult类代码示例

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


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


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