Exemplo n.º 1
0
 public ActionResult Save(MonitorItem MonitorItem)
 {
     monitorItemService.Save(MonitorItem);
     return RedirectToAction("list", "MonitorItem");
 }
Exemplo n.º 2
0
 /// <summary>
 /// 保存设备型号
 /// </summary>
 /// <param name="deviceModel"></param>
 /// <returns></returns>
 public int Save(MonitorItem monitorItem)
 {
     MonitorItem tmp = _monitorItemDao.Get(monitorItem);
     if (tmp != null)
     {
         return _monitorItemDao.Update(monitorItem);
     }
     else
         return _monitorItemDao.Insert(monitorItem);
 }