public JsonResult GetSubNormList(string parentId, bool onlyOpen = false) { IList <NormClass> list = new List <NormClass>(); if (!string.IsNullOrWhiteSpace(parentId)) { list = new NormClassModel().GetNormClassList(onlyOpen, int.Parse(parentId)); } //List<KeyValuePair<string, string>> items = new List<KeyValuePair<string, string>>(); //if (!string.IsNullOrWhiteSpace(customerID)) //{ // var orders = this.GetOrders(customerID); // if (orders.Count() > 0) // { // foreach (var order in orders) // { // items.Add(new KeyValuePair<string, string>( // order.OrderID.ToString(), // string.Format("{0} ({1:yyyy-MM-dd})", order.OrderID, order.OrderDate))); // } // } //} return(this.Json(list)); }
public ActionResult Index(string id) { if (string.IsNullOrWhiteSpace(id)) { id = ((IList <NormClass>)ViewData["ParentNormClassList"])[0].NormClassId.ToString(); id = new NormClassModel().EncryptId(id); } return(View(new NormClassModel(id))); }
public ActionResult Edit(NormClassModel model, string cdts) { GetConditions(cdts); model.Update(); return(View("AdminIndex")); }
public ActionResult Create(NormClassModel model, string cdts) { GetConditions(cdts); model.Insert(); return(View("AdminIndex")); }