本文整理匯總了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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));
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}