Exemple #1
0
        public ActionResult DeleteConfirmed(long id)
        {
            A_Voc_Mean a_Voc_Mean = db.A_Voc_Mean.Find(id);

            db.A_Voc_Mean.Remove(a_Voc_Mean);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 public ActionResult Edit([Bind(Include = "VocMeanId,VocId,MeanId,Sort,ApproveUserId,ApproveFlag,UserId,ActiveFlag,CreateTime,UpdateTime,DeleteTime")] A_Voc_Mean a_Voc_Mean)
 {
     if (ModelState.IsValid)
     {
         db.Entry(a_Voc_Mean).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     ViewBag.MeanId        = new SelectList(db.A_Mean, "MeanId", "MeanContent", a_Voc_Mean.MeanId);
     ViewBag.UserId        = new SelectList(db.A_User, "UserId", "Email", a_Voc_Mean.UserId);
     ViewBag.ApproveUserId = new SelectList(db.A_User, "UserId", "Email", a_Voc_Mean.ApproveUserId);
     ViewBag.VocId         = new SelectList(db.A_Vocabulary, "VocId", "VocContent", a_Voc_Mean.VocId);
     return(View(a_Voc_Mean));
 }
Exemple #3
0
        // GET: A_Voc_Mean/Delete/5
        public ActionResult Delete(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            A_Voc_Mean a_Voc_Mean = db.A_Voc_Mean.Find(id);

            if (a_Voc_Mean == null)
            {
                return(HttpNotFound());
            }
            return(View(a_Voc_Mean));
        }
Exemple #4
0
        // GET: A_Voc_Mean/Edit/5
        public ActionResult Edit(long?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            A_Voc_Mean a_Voc_Mean = db.A_Voc_Mean.Find(id);

            if (a_Voc_Mean == null)
            {
                return(HttpNotFound());
            }
            ViewBag.MeanId        = new SelectList(db.A_Mean, "MeanId", "MeanContent", a_Voc_Mean.MeanId);
            ViewBag.UserId        = new SelectList(db.A_User, "UserId", "Email", a_Voc_Mean.UserId);
            ViewBag.ApproveUserId = new SelectList(db.A_User, "UserId", "Email", a_Voc_Mean.ApproveUserId);
            ViewBag.VocId         = new SelectList(db.A_Vocabulary, "VocId", "VocContent", a_Voc_Mean.VocId);
            return(View(a_Voc_Mean));
        }