public override void Clear() { Commodities.Clear(); TransactionsSet.Clear(); base.Clear(); }
public Commodity(DateTime date, decimal price, decimal volume, Commodities product) : base(date, price, volume) { _product = product; }
private void OpenModuleDetail(int taskID) { //Open new form Form openingView; switch (taskID) { case (int)GlobalEnums.NmvnTaskID.Customer: openingView = new Customers(); break; case (int)GlobalEnums.NmvnTaskID.Commodity: openingView = new Commodities(); break; case (int)GlobalEnums.NmvnTaskID.BinLocation: openingView = new BinLocations(); break; case (int)GlobalEnums.NmvnTaskID.Pickup: openingView = new Pickups(); break; case (int)GlobalEnums.NmvnTaskID.GoodsReceipt: openingView = new GoodsReceipts(); break; case (int)GlobalEnums.NmvnTaskID.SalesOrder: openingView = new SalesOrders(); break; case (int)GlobalEnums.NmvnTaskID.DeliveryAdvice: openingView = new DeliveryAdvices(); break; case (int)GlobalEnums.NmvnTaskID.TransferOrder: openingView = new TransferOrders(); break; case (int)GlobalEnums.NmvnTaskID.GoodsIssue: openingView = new GoodsIssues(); break; case (int)GlobalEnums.NmvnTaskID.WarehouseAdjustment: openingView = new WarehouseAdjustments(); break; case (int)GlobalEnums.NmvnTaskID.GoodsReceiptDetailAvailable: openingView = new GoodsReceiptDetailAvailables(); break; case (int)GlobalEnums.NmvnTaskID.Report: openingView = new Reports(); break; default: openingView = new BlankView(); break; } if (openingView != null) { this.OpenView(openingView); } }
public override void Clear() { Commodities.Clear(); base.Clear(); }
private void OpenModuleDetail(int moduleDetailID) { if (moduleDetailID > 0) { Form openingView = null;//Form to open for (int i = 0; i < this.MdiChildren.Length; i++) {//Find and active the current form IToolstripChild mdiChildCallToolStrip = this.MdiChildren[i] as IToolstripChild; if (mdiChildCallToolStrip != null) { if (moduleDetailID == (int)mdiChildCallToolStrip.NMVNTaskID) { openingView = (Form)this.MdiChildren[i]; break; } } } if (openingView != null) { openingView.Activate(); IToolstripChild mdiChildCallToolStrip = openingView as IToolstripChild; if (mdiChildCallToolStrip != null) { mdiChildCallToolStrip.DoAfterActivate(); } } else { //OPEN NEW VIEW switch (moduleDetailID) { case (int)GlobalEnums.NmvnTaskID.Customers: openingView = new Customers(); break; case (int)GlobalEnums.NmvnTaskID.CustomerTypes: openingView = new CustomerTypes(); break; case (int)GlobalEnums.NmvnTaskID.CustomerCategories: openingView = new CustomerCategories(); break; case (int)GlobalEnums.NmvnTaskID.Commodities: openingView = new Commodities(); break; case (int)GlobalEnums.NmvnTaskID.CommoditySettings: openingView = new CommoditySettings(); break; case (int)GlobalEnums.NmvnTaskID.CommodityTypes: openingView = new CommodityTypes(); break; case (int)GlobalEnums.NmvnTaskID.CommodityCategories: openingView = new CommodityCategories(); break; case (int)GlobalEnums.NmvnTaskID.BinLocations: openingView = new BinLocations(); break; case (int)GlobalEnums.NmvnTaskID.Teams: openingView = new Teams(); break; case (int)GlobalEnums.NmvnTaskID.Territories: openingView = new Territories(); break; case (int)GlobalEnums.NmvnTaskID.Warehouses: openingView = new Warehouses(); break; case (int)GlobalEnums.NmvnTaskID.Employees: openingView = new Employees(); break; case (int)GlobalEnums.NmvnTaskID.Pickups: openingView = new Pickups(); break; case (int)GlobalEnums.NmvnTaskID.GoodsReceipts: openingView = new GoodsReceipts(); break; case (int)GlobalEnums.NmvnTaskID.Forecasts: openingView = new Forecasts(); break; case (int)GlobalEnums.NmvnTaskID.SalesOrders: openingView = new SalesOrders(); break; case (int)GlobalEnums.NmvnTaskID.DeliveryAdvices: openingView = new DeliveryAdvices(); break; case (int)GlobalEnums.NmvnTaskID.TransferOrders: openingView = new TransferOrders(); break; case (int)GlobalEnums.NmvnTaskID.GoodsIssues: openingView = new GoodsIssues(); break; case (int)GlobalEnums.NmvnTaskID.WarehouseAdjustments: openingView = new WarehouseAdjustments(); break; case (int)GlobalEnums.NmvnTaskID.AvailableItems: openingView = new GoodsReceiptDetailAvailables(); break; case (int)GlobalEnums.NmvnTaskID.PendingOrders: openingView = new PendingOrders(); break; case (int)GlobalEnums.NmvnTaskID.Reports: openingView = new Reports(); break; default: openingView = new BlankView(); break; } if (openingView != null) { this.OpenView(openingView); } } if (!this.naviBarModuleMaster.Collapsed) { buttonNaviBarHeader_Click(this.buttonNaviBarHeader, new EventArgs()); } } }
public float GetPrice(string commodityName) { var commodity = Commodities.SingleOrDefault(p => p.Name == commodityName); return(commodity != null ? commodity.Price : 0); }
private void SetCommodities(ILocation location) => location.SetCommodities(Commodities.OrderBy(Random).Take(5));