예제 #1
0
 public ActionResult Edit(Lookup_ContactType lookup_contacttype)
 {
     if (ModelState.IsValid)
     {
         db.Entry(lookup_contacttype).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     ViewBag.ContactBasis_LCID = new SelectList(db.Lookup_ContactBasis, "Id", "Title", lookup_contacttype.ContactBasis_LCID);
     return View(lookup_contacttype);
 }
예제 #2
0
        public ActionResult Create(Lookup_ContactType lookup_contacttype)
        {
            if (ModelState.IsValid)
            {
                lookup_contacttype.Id = Guid.NewGuid();
                db.Lookup_ContactType.Add(lookup_contacttype);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.ContactBasis_LCID = new SelectList(db.Lookup_ContactBasis, "Id", "Title", lookup_contacttype.ContactBasis_LCID);
            return View(lookup_contacttype);
        }