public InvestmentProduct GetById(int Id)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", Id);

            return((InvestmentProduct)DapperORM.ReturnSingle <InvestmentProduct>("GetProduct", spParams));
        }
        public InvestmentCycle GetById(int Id)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", Id);

            return((InvestmentCycle)DapperORM.ReturnSingle <InvestmentCycle>("GetInvestmentCycle", spParams));
        }
Exemplo n.º 3
0
        public User GetById(int Id)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", Id);

            return((User)DapperORM.ReturnSingle <User>("GetUser", spParams));
        }
        public void Delete(int Id, User user)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", Id);
            spParams.Add("UserId", user.Id);

            DapperORM.ExecuteWithoutReturn("DeleteProduct", spParams);
        }
Exemplo n.º 5
0
        public void AddEdit(InvestmentCategory investmentCategory, User user)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", investmentCategory.Id);
            spParams.Add("Name", investmentCategory.Name);
            spParams.Add("Description", investmentCategory.Description);
            spParams.Add("UserId", user.Id);

            DapperORM.ExecuteWithoutReturn("AddEditProductCategory", spParams);
        }
Exemplo n.º 6
0
        public void AddEdit(User theUser)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", theUser.Id);
            spParams.Add("UserName", theUser.UserName);
            spParams.Add("FirstName", theUser.FirstName);
            spParams.Add("MiddleName", theUser.MiddleName);
            spParams.Add("Surname", theUser.Surname);

            DapperORM.ExecuteWithoutReturn("AddEditUser", spParams);
        }
        public void AddEdit(InvestmentCycle investmentCycle, User user)
        {
            DynamicParameters spParams = new DynamicParameters();

            spParams.Add("Id", investmentCycle.Id);
            spParams.Add("FromDate", investmentCycle.FromDate);
            spParams.Add("ProductId", investmentCycle.ProductId);
            spParams.Add("TargetAmount", investmentCycle.TargetAmount);
            spParams.Add("MinimumAmount", investmentCycle.MinimumAmount);
            spParams.Add("MaximumAmount", investmentCycle.MaximumAmount);
            spParams.Add("UserId", user.Id);

            DapperORM.ExecuteWithoutReturn("AddEditInvestmentCycle", spParams);
        }
        public List <InvestmentProductManagerViewModel> GetAll()
        {
            List <InvestmentProductManagerViewModel> var = (List <InvestmentProductManagerViewModel>)DapperORM.ReturnList <InvestmentProductManagerViewModel>("GetProducts");

            foreach (InvestmentProductManagerViewModel prod in var)
            {
                prod.InvestmentCategory = new InvestmentCategory
                {
                    Id          = prod.ProductCategoryId,
                    Name        = prod.ProductCategoryName,
                    Description = prod.ProductCategoryName
                };
            }
            return(var);
        }
Exemplo n.º 9
0
 public List <User> GetAll()
 {
     return((List <User>)DapperORM.ReturnList <User>("GetProducts"));
 }
Exemplo n.º 10
0
 public List <InvestmentCategoryManagerViewModel> GetAll()
 {
     return((List <InvestmentCategoryManagerViewModel>)DapperORM.ReturnList <InvestmentCategoryManagerViewModel>("GetProductCategories"));
 }
 public List <InvestmentCycleManagerViewModel> GetAll()
 {
     return((List <InvestmentCycleManagerViewModel>)DapperORM.ReturnList <InvestmentCycleManagerViewModel>("GetInvestmentCycles"));
 }