public JsonResult GetTrackerEntries(DataTableParams dtParams) { Session currentSession = Helpers.AuthenticationHelper.GetSession(System.Web.HttpContext.Current); BusinessLibrary.Library.CurrencyConversionTrackerLibrary ctLib = new BusinessLibrary.Library.CurrencyConversionTrackerLibrary(System.Web.HttpContext.Current, currentSession); return(Json(ctLib.GetTrackerListForUser(dtParams).EntryListDataTable, JsonRequestBehavior.AllowGet)); }
public JsonResult DeleteAllEntries() { Session currentSession = Helpers.AuthenticationHelper.GetSession(System.Web.HttpContext.Current); BusinessLibrary.Library.CurrencyConversionTrackerLibrary ctLib = new BusinessLibrary.Library.CurrencyConversionTrackerLibrary(System.Web.HttpContext.Current, currentSession); try { ctLib.DeleteAllEntriesForUser(); return(Json(new { StatusKey = "SUCCESS" })); } catch { return(Json(new { StatusKey = "ERROR" })); } }
public JsonResult DeleteEntry(BusinessLibrary.UIRequestClasses.TrackerUpdateRequest entryRowObject) { Session currentSession = Helpers.AuthenticationHelper.GetSession(System.Web.HttpContext.Current); BusinessLibrary.Library.CurrencyConversionTrackerLibrary ctLib = new BusinessLibrary.Library.CurrencyConversionTrackerLibrary(System.Web.HttpContext.Current, currentSession); try { ctLib.DeleteEntry(entryRowObject.entryID); return(Json(new { StatusKey = "SUCCESS", rowID = entryRowObject.rowID })); } catch { return(Json(new { StatusKey = "ERROR", rowID = entryRowObject.rowID })); } }
public JsonResult SaveNewTrackerEntry(ConversionTrackerViewModel tvm) { Session currentSession = Helpers.AuthenticationHelper.GetSession(System.Web.HttpContext.Current); if (tvm.EntryName == null) { tvm.EntryName = ""; } BusinessLibrary.Library.CurrencyConversionTrackerLibrary ctLib = new BusinessLibrary.Library.CurrencyConversionTrackerLibrary(System.Web.HttpContext.Current, currentSession); try { ctLib.SaveNewEntry(tvm); return(Json(new { StatusKey = "SUCCESS" })); } catch { return(Json(new { StatusKey = "ERROR" })); } }