public ActionResult Delete() { //if (ModelState.IsValid) { DollarRepository _dollar = new DollarRepository(); _dollar.DeleteAllDollars(); } return(RedirectToAction("Index")); }
public ActionResult Create(Dollar dollar) { if (ModelState.IsValid) { DollarRepository _dollar = new DollarRepository(); _dollar.InsertDollar(dollar); return(RedirectToAction("Index")); } if (Request.IsAjaxRequest()) { return(PartialView(dollar)); } return(View(dollar)); }
public JsonResult GetActiveJob() { try { var repo = new DollarRepository(); var data = repo.FetchActiveJob(); return(Json(data, JsonRequestBehavior.AllowGet)); } catch (Exception e) { //this.LogError(String.Format("{0} List controller method failed with an error of {0}:{1}", "GetKPI", e)); //return Json(new { exception = e.Message }, JsonRequestBehavior.AllowGet); throw e; } }
static public int GetPriceInDollar(int PriceInDollar) { int output = 0; try { DollarRepository _DollarRep = new DollarRepository(); int CurrentDollarPrice = Convert.ToInt32(_DollarRep.CurrentDollar()); output = CurrentDollarPrice * PriceInDollar; } catch { } return(output); }