public ActionResult AddNew() { var userId = User.Identity.GetUserId(); var UserInfo = _unitOfWork.User.GetMyInfo(userId); CurrencyValueVM Obj = new CurrencyValueVM { Currency = _unitOfWork.Currency.GetAllCurrency(UserInfo.fCompanyId) }; return(PartialView(Obj)); }
public JsonResult GetCurrencyValueById(int id) { var userId = User.Identity.GetUserId(); var UserInfo = _unitOfWork.User.GetMyInfo(userId); if (id != 0) { var repo = _unitOfWork.NativeSql.GetCurrencyValueByID(UserInfo.fCompanyId, id); if (repo == null) { repo = new CurrencyValueVM { ConversionFactor = 0 }; } ; return(Json(repo.ConversionFactor, JsonRequestBehavior.AllowGet)); } return(Json(1, JsonRequestBehavior.AllowGet)); }