public ActionResult Add(string key) { var model = new DN_DocumentRoom(); try { var documentLevelId = Request["DocumentLevelID"]; if (key != Keyapi) { return(Json(0, JsonRequestBehavior.AllowGet)); } UpdateModel(model); if (!string.IsNullOrEmpty(documentLevelId)) { model.DocumentLevelID = Convert.ToInt32(documentLevelId); } model.AgencyID = Agencyid(); model.IsDeleted = false; model.Name = HttpUtility.UrlDecode(model.Name); _da.Add(model); _da.Save(); return(Json(model.ID, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(0, JsonRequestBehavior.AllowGet)); } }
public void Delete(DN_DocumentRoom item) { FDIDB.DN_DocumentRoom.Remove(item); }
public void Add(DN_DocumentRoom item) { FDIDB.DN_DocumentRoom.Add(item); }