public ActionResult Create(SysListItem syslistitem)
        {
            if (ModelState.IsValid)
            {
                db.SysListItems.Add(syslistitem);
                try
                {
                    db.SaveChanges();
                }
                catch (Exception ex)
                {
                    ViewBag.ErrorMessage=ex.Message;
                    return View("Error");
                }

                return RedirectToAction("Index", new { sysListId = syslistitem.SysListId });
            }
            ViewBag.SysListId = syslistitem.SysListId;
            return PartialView(syslistitem);
        }
 public ActionResult Edit(SysListItem syslistitem)
 {
     if (ModelState.IsValid)
     {
         db.Entry(syslistitem).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index", new { sysListId = syslistitem.SysListId });
     }
     ViewBag.SysListId = syslistitem.SysListId;
     return PartialView(syslistitem);
 }