示例#1
0
        public ActionResult Edit([Bind(Include = "Id,Question,Answer,SortOrder")] FAQ fAQ)
        {
            int nSort = 1000000;

            if (fAQ.SortOrder != null)
            {
                nSort = (int)fAQ.SortOrder;
            }

            if (ModelState.IsValid)
            {
                db.Entry(fAQ).State = EntityState.Modified;
                db.SaveChanges();
                nSort = _dc.ReOrderFAQ(fAQ, nSort);
                return(RedirectToAction("Index"));
            }
            return(View(fAQ));
        }