コード例 #1
0
 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();
     }
 }
コード例 #2
0
 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();
     }
 }