Пример #1
0
 public ActionResult Delete()
 {
     //if (ModelState.IsValid)
     {
         DollarRepository _dollar = new DollarRepository();
         _dollar.DeleteAllDollars();
     }
     return(RedirectToAction("Index"));
 }
Пример #2
0
 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));
 }
Пример #3
0
 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;
     }
 }
Пример #4
0
        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);
        }