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)); }
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(); } }
public abstract void AddPlan(AddPlanToStoreWithUser modelParam);