예제 #1
0
        public void Add(ProductAddDTO Entty)
        {
            /* if (Entty.İmage!=null)
             * {
             *   Entty.İmage.SaveAs(Server.MapPath("~/Imj/Product/") + Entty.İmage.FileName);
             * }*/


            /*   Products Products = new Products
             * {
             *     name = Entty.name,
             *     CategoryID = Entty.CategoryID,
             *     Store = Entty.Store,
             *     Price = Entty.Price,
             *     Cost = Entty.Cost,
             *     Description = Entty.Description,
             *     discount_rate = Entty.discount_rate,
             *     İmageurl = Entty.İmage.FileName
             * };*/
            Products product = new Products();

            product.CategoryID    = Entty.CategoryID;
            product.Cost          = Entty.Cost;
            product.Price         = Entty.Price;
            product.İmageurl      = null;
            product.discount_rate = 10;
            product.Description   = Entty.Description;
            product.display       = true;
            product.name          = Entty.name;


            Product.ADD(product);
        }