예제 #1
0
 public AdminController(
     IUserManagement userManagement,
     IProductManagement productManagement)
 {
     this.userManagement = userManagement;
     this.productManagement = productManagement;
 }
 public OrderController()
 {
     Management        = new CartManagement();
     OrderManagement   = new OrderManagement();
     UserManagement    = new UserManagement();
     ProductManagement = new ProductManagement();
 }
        /// <summary>
        /// Bridge extension for DeleteProduct using an id
        /// </summary>
        public static bool DeleteProduct(this IProductManagement facade, long id)
        {
            if (facade is IProductManagementModification modification)
            {
                return(modification.DeleteProduct(id));
            }

            throw new NotSupportedException("Instance of product management does not support expression delete product");
        }
        /// <summary>
        /// Bridge extension for LoadTypes using filter expression
        /// </summary>
        public static IReadOnlyList <TType> LoadTypes <TType>(this IProductManagement facade, Expression <Func <TType, bool> > selector)
        {
            if (facade is IProductManagementTypeSearch typeSearch)
            {
                return(typeSearch.LoadTypes(selector));
            }

            throw new NotSupportedException("Instance of product management does not support expression type search");
        }
예제 #5
0
        public ModelViewModel(IModelManagement modelManagement, IProductManagement productManagement, IManufactureManager manufactureManager)
        {
            this.modelManagement    = modelManagement;
            this.productManagement  = productManagement;
            this.manufactureManager = manufactureManager;

            GetProductTypes();
            getAllManufatures();
            getAllModels();
        }
    void Visit(IProductManagement management)
    {
        var batchManagement = management as IManagedByBatchNumber;

        if (Object.ReferenceEquals(null, batchManagement))
        {
            return;
        }
        Console.WriteLine($"Batch number: {batchManagement.BatchNo}");
    }
예제 #7
0
#pragma warning restore CS0649 // Field 'ProductController.isFakeData' is never assigned to, and will always have its default value false

        public ProductController(IProductManagement _ipromngmt)
        {
            try
            {
                ipromngmt = _ipromngmt;
                if (ipromngmt == null)
                {
                    ipromngmt     = new ProductManagement();
                    currentUserID = ((CustomPrincipal)HttpContext.Current.User).UserId;
                }
                else
                {
                    currentUserID = ((CustomPrincipal)HttpContext.Current.User).UserId;
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public ProductManagementMemoryDbTest()
 {
     _productManagement = new ProductManagementMemoryDb();
 }
예제 #9
0
 public ProductTypeViewModel(IProductManagement productManagement)
 {
     this.productManagement = productManagement;
 }
예제 #10
0
 public ProductController(IProductManagement productManagement)
 {
     _productManagement = productManagement;
 }
예제 #11
0
 public DietController(IProductManagement productManagement,
     IUserGoalsManagement userGoalsManamgenet)
 {
     this.productManagement = productManagement;
     this.userGoalsManamgenet = userGoalsManamgenet;
 }
예제 #12
0
 public DailyProductTableViewComponent(IProductManagement productManagement)
 {
     this.productManagement = productManagement;
 }
 public ProductsController(IProductManagement productManagement)
 {
     this.productManagement = productManagement;
 }
예제 #14
0
 public ProductManagementSqLiteTest()
 {
     _productManagement = new ProductManagementSqLite();
 }
 public InventoryItemsController(IInventoryItemManagement inventoryItemManagement,
                                 IProductManagement productManagement)
 {
     this.inventoryItemManagement = inventoryItemManagement;
     this.productManagement = productManagement;
 }
예제 #16
0
 public HomeController()
 {
     ProductManagement = new ProductManagement();
 }
예제 #17
0
 public FilterUtil(IProductManagement productDb)
 {
     _productDb = productDb;
 }