public class RemoteExtAttribute : RemoteAttribute
{
private string _resourceKey; public RemoteExtAttribute(string action, string controller, string areaName)
: base(action, controller, areaName)
{
base.RouteData["area"] = areaName;
} public RemoteExtAttribute(string action, string controller)
: this(action, controller, "")
{ } public RemoteExtAttribute(string action, string controller, string areaName,string resourceKey, string errMsgResourceKey)
: this(action, controller, areaName)
{
string displayName = EP.GlobalResources.EPLocalization.ResourceManager.GetString(resourceKey);
displayName = string.IsNullOrEmpty(displayName) ? resourceKey : displayName;
string errMsg = EP.GlobalResources.EPLocalization.ResourceManager.GetString(errMsgResourceKey);
errMsg = string.IsNullOrEmpty(errMsg) ? errMsgResourceKey : errMsg;
this.ErrorMessage = string.Format(" [{0}] {1}", displayName, errMsg);
} }

  

/// <summary>
/// 账号唯一性
/// </summary>
public partial class RVMdEmployeeController : MutilLangController
{
[HttpGet]
[OutputCache(Location = OutputCacheLocation.None, NoStore = true)]
public JsonResult IsValidAcc(string Account)
{
Account = Account.CleanCode(30);
bool v = MdEmployee.Count(TblMdEmployee._.Account == Account) >= 1;
return Json(!v, JsonRequestBehavior.AllowGet);
}
}

  

[RemoteExt("IsValidUId", "RVMdEmployee", "", AdditionalFields = "__DS", ErrorMessageResourceName = "G_DuplicatedKey", ErrorMessageResourceType = typeof(EP.GlobalResources.EPLocalization))]

05-11 22:11