[HttpGet]
public ActionResult CheckToolsIdExists(string ToolsID)
{
using (BaseContext context = new BaseContext("ToolsTB"))
{
var isExists = context.T_ToolsSet.FirstOrDefault(m => m.ToolsID == ToolsID);
if (isExists != null)
{
return Json(false, JsonRequestBehavior.AllowGet);
}
return Json(true, JsonRequestBehavior.AllowGet);
}
}

[Remote("CheckToolsIdExists", "SystemManagement",ErrorMessage = "伺服机编号已存在!")]
[Required(ErrorMessage = "*编号不能为空!")]
public string ToolsID { get; set; }

<script src="~/Scripts/jquery-1.7.1.min.js"></script>
<script src="~/Scripts/jquery.validate.min.js"></script>
<script src="~/Scripts/jquery.validate.unobtrusive.js"></script>

<tr>
<td width="120" align="right">拧紧机编号:</td>
<td>@Html.TextBoxFor(m => m.ToolsID, new { @class = "txt", })&nbsp;@Html.ValidationMessageFor(m => m.ToolsID)</td>
</tr>

最新文章

  1. tornado template
  2. Android中锁定文件的方法
  3. weblogic配置数据源
  4. 小议jQuery插件开发
  5. Github上十大C#开源项目排行榜
  6. 字符串中带有emoji表情处理
  7. transform实现的时钟效果
  8. android ScrollView滚动距离和判断滚动停止状态
  9. iOS - UIButton
  10. 锋利的jQuery之事件
  11. 函数lock_rec_create
  12. 无法解析的外部符号 _WinMain@16 fatal error LNK1120: 1 个无法解析的外部命令
  13. Pyhon安装media模块
  14. 使用 gridfs-stream 存储文件遇到的一个坑。
  15. 解决author波浪线Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click
  16. OpenCV设置摄像头分辨率及全屏显示
  17. Linux动态链接库的生成和使用
  18. OutOfMemoryError 到底能不能被捕获?
  19. webpack点滴
  20. 2.scrapy安装

热门文章

  1. mongodb spring
  2. (转载)MVC 4.0 PartialView()与View()真的一样吗?
  3. RF学习过程中遇到的问题
  4. Run Loops
  5. CSS中cursor的pointer 与 hand-备
  6. caffe绘制训练过程的loss和accuracy曲线
  7. FLASH驱动之-块设备驱动系统构架
  8. cf C. Levko and Array Recovery
  9. 瞬态抑制二极管TVS的基本知识
  10. iptables 顺序