示例#1
0
 public ActionResult Creat()
 {
     PropModel prop_mod = new PropModel();
     prop_mod.Type = ((int)eSelpropType.Color).ToString();
     InitTypeSel(String.Empty);
     return View(prop_mod);
 }
示例#2
0
 public ActionResult Index(int id, PropModel prop_mod)
 {
     InitTypeSel(prop_mod.Type);
     if (!ModelState.IsValid) return View(prop_mod);
     mSelprop prop = item_get.SelpropGet(id);
     prop.Name = prop_mod.Name;
     prop.ClassName = prop_mod.ClassName;
     prop.PropType = (eSelpropType)int.Parse(prop_mod.Type);
     item_sub.SelpropUpdate(prop);
     return View(prop_mod);
 }
示例#3
0
 public ActionResult Index(int id)
 {
     mSelprop prop = item_get.SelpropGet(id);
     PropModel prop_mod = new PropModel {
         Name = prop.Name,
         Type = Convert.ToInt32(prop.PropType).ToString(),
         ClassName = prop.ClassName,
     };
     InitTypeSel(prop_mod.Type);
     return View(prop_mod);
 }
示例#4
0
 public ActionResult Creat(PropModel prop_mod)
 {
     if (!ModelState.IsValid) return View(prop_mod);
     mSelprop prop = new mSelprop {
         Name = prop_mod.Name,
         ClassName = prop_mod.ClassName,
         PropType = (eSelpropType)int.Parse(prop_mod.Type)
     };
     item_sub.SelpropAdd(prop);
     return RedirectToAction("List", "Prop", new { id = 1 });
 }