Example #1
0
            //public List<BasketTemp> baskettlist { get; set; }
            public BasketTemp AddToTempBasket(int id, string kullanici)
            {
                UsersManager usm = new UsersManager();

                ProductsManager      pm           = new ProductsManager();
                ParamManager         paramManager = new ParamManager();
                Param                param        = paramManager.Single("DU");
                Products             product      = pm.Single(id);
                BasketTemp           basketTemp   = new BasketTemp();
                BasketTempRepository btm          = new BasketTempRepository();

                basketTemp.Amount     = 1;
                basketTemp.Duration   = param.Parameter;
                basketTemp.ProductsID = product.ProductsID;
                basketTemp.UnitPrice  = 100;
                basketTemp.User       = kullanici;
                basketTemp.Users      = usm.Single(kullanici);
                btm.Insert(basketTemp);
                //baskettlist.Add(basketTemp);
                return(basketTemp);
            }