Ejemplo n.º 1
0
        public JsonResult AddPlan(AddPlanToStoreModel model)
        {
            AddPlanToStoreWithUser modelToSend = _mapperManager.MapModel <AddPlanToStoreModel, AddPlanToStoreWithUser>(model);

            modelToSend.UserId = Convert.ToInt32(User.Identity.Name);
            _planManager.AddPlan(modelToSend);
            return(Json(null));
        }
Ejemplo n.º 2
0
 public override void AddPlan(AddPlanToStoreWithUser modelParam)
 {
     using (_unitOfWork = DIManager.UnitOfWork)
     {
         var planUSDSum = scriptor.ChangeBuyRateForCurrency(modelParam.Sum, modelParam.CurrencyName, "USD");
         PAccountantEntities context = _unitOfWork.PersonalAccountantContext as PAccountantEntities;
         context.other_PlannedBuy.Add(new other_PlannedBuy()
         {
             Name   = modelParam.Name,
             Sum    = planUSDSum,
             UserId = modelParam.UserId
         });
         _unitOfWork.Save();
     }
 }
Ejemplo n.º 3
0
 public abstract void AddPlan(AddPlanToStoreWithUser modelParam);