Exemple #1
0
        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));
        }
Exemple #2
0
        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));
        }