public ActionResult Add(string key) { var model = new DN_CabinetDocument(); try { if (key != Keyapi) { return(Json(0, JsonRequestBehavior.AllowGet)); } UpdateModel(model); model.Name = HttpUtility.UrlDecode(model.Name); model.Description = HttpUtility.UrlDecode(model.Description); model.AgencyID = Agencyid(); model.IsDeleted = false; _da.Add(model); _da.Save(); return(Json(model.ID, JsonRequestBehavior.AllowGet)); } catch (Exception) { return(Json(0, JsonRequestBehavior.AllowGet)); } }
public void Delete(DN_CabinetDocument item) { FDIDB.DN_CabinetDocument.Remove(item); }
public void Add(DN_CabinetDocument item) { FDIDB.DN_CabinetDocument.Add(item); }