public ActionResult Index(string id) { if (string.IsNullOrWhiteSpace(id)) { int classId = ((IList<GreenFactoryClass>)ViewData["GreenFactoryClassList"])[0].GreenFactoryClassId; IList<GreenFactory> list = new GreenFactoryClassModel().GetGreenFactoryList(true, classId); return View(new GreenFactoryModel(list[0].GreenFactoryId, true)); } return View(new GreenFactoryModel(id, true)); }
public ActionResult Edit(GreenFactoryClassModel model, string cdts) { GetConditions(cdts); model.Update(); return View("AdminIndex"); }