public ActionResult AddToken(Entities::Models.DynamicToken instance, string code, string hidtype) { dynamic data = new System.Dynamic.ExpandoObject(); data.one = new Entities::Models.DynamicToken(); if (hidtype == "add") { return(PartialView(instance)); } if (hidtype == "update") { return(PartialView(_tokenRepos.GetDynamicTokenCode(code))); } return(PartialView(data)); }
public ActionResult saveToken(Entities::Models.DynamicToken instance, string hidtype) { try { if (hidtype == "add") { _tokenRepos.AddService(instance); LogHelper.BackInfo("007012", Masterpage.AdminCurrUser.userid, "添加令牌:" + "[令牌号:" + instance.TokenCode + "]" + "[种子码:" + instance.TokenSeed + "]" + "[备注:" + instance.TokenRemark + "]" + "[令牌许可:" + instance.TokenPermit + "]"); } if (hidtype == "update") { _tokenRepos.UpdateService(instance); LogHelper.BackInfo("007013", Masterpage.AdminCurrUser.userid, "修改令牌:" + "[令牌号:" + instance.TokenCode + "]" + "[种子码:" + instance.TokenSeed + "]" + "[备注:" + instance.TokenRemark + "]" + "[令牌许可:" + instance.TokenPermit + "]"); } } catch { } return(RedirectToAction("DynamicToken", new { first = instance.TokenCode })); }