public ActionResult DeleteConfirmed(int id) { ErrorCodeTable errorCodeTable = db.ErrorCodeTable.Find(id); db.ErrorCodeTable.Remove(errorCodeTable); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ID,ErrorCode,ErrorDefine,Department,Company")] ErrorCodeTable errorCodeTable) { if (ModelState.IsValid) { db.Entry(errorCodeTable).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(errorCodeTable)); }
public ActionResult Create([Bind(Include = "ID,ErrorCode,ErrorDefine,Department,Company")] ErrorCodeTable errorCodeTable) { if (ModelState.IsValid) { db.ErrorCodeTable.Add(errorCodeTable); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(errorCodeTable)); }
// GET: ErrorCodeTables/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ErrorCodeTable errorCodeTable = db.ErrorCodeTable.Find(id); if (errorCodeTable == null) { return(HttpNotFound()); } return(View(errorCodeTable)); }
public ActionResult CreateErrorCodePost([Bind(Include = "ID,ErrorCode,ErrorDefine,Department,Company")] ErrorCodeTable errorCodeTable) { Common common = new Common(); errorCodeTable.Company = common.getCurrentUserModel().Company; if (ModelState.IsValid) { db.ErrorCodeTable.Add(errorCodeTable); db.SaveChanges(); return(Redirect(HttpContext.Request.UrlReferrer.AbsoluteUri)); } return(Redirect(HttpContext.Request.UrlReferrer.AbsoluteUri)); }
// GET: ErrorCodeTables/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ErrorCodeTable errorCodeTable = db.ErrorCodeTable.Find(id); if (errorCodeTable == null) { return(HttpNotFound()); } ViewBag.DepartmentList = dropDownManager.getDepartmentDropDownList(); // department listesi atanır dropdown için return(View(errorCodeTable)); }
/// <summary> /// Check if HRESULT value is a OneNote API Error Code. /// </summary> /// <param name="errorCode">An Exception.HResult property value.</param> /// <returns>True if value is a OneNote API error code; false otherwise.</returns> internal static bool IsErrorCode(HRESULT errorCode) => ErrorCodeTable.ContainsKey(errorCode);