public ActionResult DeleteConfirmed(int id) { T_Office_Files t_Office_Files = db.T_Office_Files.Find(id); db.T_Office_Files.Remove(t_Office_Files); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,partType,Mode,FileName,thumbnailImg,Nature,Information,Path,Size,Outdate,Type,Permission,Products,Lock,Language,verificationCode,deleteSign,UpdateTime,CreateTime,deletePerson,CreatePerson,UpdatePerson,Remark")] T_Office_Files t_Office_Files) { if (ModelState.IsValid) { db.Entry(t_Office_Files).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(t_Office_Files)); }
public ActionResult addT_file(T_Office_Files model) { int n = bll_file.AddT_Office_Files(model); if (n > 0) { return(RedirectToAction("Index", "JCOfficeManager", new { msg = "添加成功!!" })); } else { return(RedirectToAction("Index", "JCOfficeManager", new { msg = "添加失败!!" })); } }
// GET: T_Office_Files/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } T_Office_Files t_Office_Files = db.T_Office_Files.Find(id); if (t_Office_Files == null) { return(HttpNotFound()); } return(View(t_Office_Files)); }
public int AddT_Office_Files(T_Office_Files model) { //有效性检查 try { using (DBGemmyService2 d = new DBGemmyService2()) { d.T_Office_Files.Add(model); return(d.SaveChanges()); } } catch (Exception) { return(0); } }