OpenAuth.Net/OpenAuth.Mvc/Controllers/RelevanceManagerController.cs

46 lines
1.2 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Web;
using System.Web.Mvc;
using Infrastructure;
using OpenAuth.App;
using OpenAuth.Mvc.Models;
namespace OpenAuth.Mvc.Controllers
{
public class RelevanceManagerController : BaseController
{
public RevelanceManagerApp App { get; set; }
[HttpPost]
2017-10-11 16:19:34 +08:00
public string Assign(string type, string firstId, string[] secIds)
{
try
{
App.Assign(type, firstId, secIds);
}
catch (Exception ex)
{
2016-10-14 11:22:16 +08:00
Result.Status = false;
Result.Message = ex.Message;
}
2016-10-14 11:22:16 +08:00
return JsonHelper.Instance.Serialize(Result);
}
[HttpPost]
2017-10-11 16:19:34 +08:00
public string UnAssign(string type, string firstId, string[] secIds)
{
try
{
App.UnAssign(type, firstId, secIds);
}
catch (Exception ex)
{
2016-10-14 11:22:16 +08:00
Result.Status = false;
Result.Message = ex.Message;
}
2016-10-14 11:22:16 +08:00
return JsonHelper.Instance.Serialize(Result);
}
}
}