/// <summary> /// 查询设备信息 /// </summary> /// <returns></returns> public ActionResult Single() { string CompanyID = WebUtil.GetFormValue <string>("CompanyID"); string SnNum = WebUtil.GetFormValue <string>("SnNum"); EquipmentProvider provider = new EquipmentProvider(CompanyID); EquipmentEntity entity = provider.GetEquipment(SnNum); DataResult <EquipmentEntity> result = new DataResult <EquipmentEntity>() { Code = (int)EResponseCode.Success, Message = "响应成功", Result = entity }; return(Content(JsonHelper.SerializeObject(result))); }
public ActionResult Empower() { string SnNum = WebUtil.GetQueryStringValue <string>("SnNum"); if (SnNum.IsEmpty()) { ViewBag.Equipment = new EquipmentEntity(); return(View()); } else { EquipmentProvider provider = new EquipmentProvider(); EquipmentEntity entity = provider.GetEquipment(SnNum); entity = entity == null ? new EquipmentEntity() : entity; ViewBag.Equipment = entity; return(View()); } }
public ActionResult Add() { string SnNum = WebUtil.GetQueryStringValue <string>("SnNum"); if (SnNum.IsEmpty()) { ViewBag.Status = EnumHelper.GetOptions <EEquipmentStatus>(string.Empty, "请选择"); ViewBag.Equipment = new EquipmentEntity(); return(View()); } else { EquipmentProvider provider = new EquipmentProvider(); EquipmentEntity entity = provider.GetEquipment(SnNum); entity = entity == null ? new EquipmentEntity() : entity; ViewBag.Status = EnumHelper.GetOptions <EEquipmentStatus>(entity.Status, "请选择"); ViewBag.Equipment = entity; return(View()); } }