public ProductionOrder(string orderID, ProductClass product, DateTime orderDate, DateTime orderDeliveryDate) { OrderID = orderID; Product = product; OrderDate = orderDate; OrderDeliveryDate = orderDeliveryDate; ProductionProgress = Product.GetCopyToolTypeList(); }
/// <summary> /// Return Copy of the Product /// </summary> /// <returns></returns> public ProductClass Copy() { ProductClass product = new ProductClass(ProductID); product.ProductName = this.ProductName; product.ProductCapacity = this.ProductCapacity; product.ProductTree = this.ProductTree; // product.ToolsTypeList = this.ToolsTypeList.copy(); return(product); }
public ProductClass GetProduct(string productID) { try { ProductClass product = new ProductClass(productID); return(ProductList[ProductList.IndexOf(product)]); } catch (Exception) { MessageBox.Show(productID + " not found"); return(null); } }
public ToolList loadTool(InitDataLoad initDataLoad) { ToolTypeClassList toolTypeClassList = initDataLoad.MetaData.ToolTypeMetaData; ProductClassList productslist = initDataLoad.MetaData.ProductsMetaData; FileManager fileManger = new FileManager(); string filePath; filePath = @"C:\Users\eyurkovs\Desktop\final progect\FinalProject\FinalProject\FinalProject\dataSets\Scenario1\ToolList.csv"; DataTable toolTable; try { toolTable = fileManger.GetCSV(filePath); } catch (Exception) { MessageBox.Show("Choose toollist file path"); filePath = fileManger.openFilePathCSV(); toolTable = fileManger.GetCSV(filePath); } ToolList toollist = new ToolList(); foreach (DataRow row in toolTable.Rows) { Tool tool = new Tool(); tool.ToolID = row[0].ToString(); tool.ToolName = row[1].ToString(); tool.ToolType = toolTypeClassList.GetToolType(row[2].ToString()); tool.ShiftStartTime = Convert.ToInt16(row[3].ToString()); tool.ShiftStartTime = Convert.ToInt16(row[4].ToString()); ProductClass product = productslist.GetProduct(row[5].ToString()); int productionTime = Convert.ToInt16(row[6].ToString()); tool.ProductsProcessingTime.Add(product, productionTime); toollist.AddTool(tool); } return(toollist); }
/// <summary> /// Return the prosesing time of a product /// </summary> /// <param name="product"></param> /// <returns></returns> private int getProductionTime(ProductClass product) { return(ProductsProcessingTime[product]); }
public ProductClass GetProduct(ProductClass product) { return(ProductList[ProductList.IndexOf(product)]); }
public void AddProduct(ProductClass product) { ProductList.Add(product); }
public override bool Equals(object obj) { ProductClass product = (ProductClass)obj; return(ProductID.Equals(product.ProductID)); }
public PriceTable(ProductClass product, int amount, double price) { Product = product; Amount = amount; Price = price; }