示例#1
0
 public ProductionOrder(string orderID, ProductClass product, DateTime orderDate, DateTime orderDeliveryDate)
 {
     OrderID            = orderID;
     Product            = product;
     OrderDate          = orderDate;
     OrderDeliveryDate  = orderDeliveryDate;
     ProductionProgress = Product.GetCopyToolTypeList();
 }
示例#2
0
        /// <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);
        }
示例#3
0
 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);
     }
 }
示例#4
0
        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);
        }
示例#5
0
 /// <summary>
 /// Return the prosesing time of a product
 /// </summary>
 /// <param name="product"></param>
 /// <returns></returns>
 private int getProductionTime(ProductClass product)
 {
     return(ProductsProcessingTime[product]);
 }
示例#6
0
 public ProductClass GetProduct(ProductClass product)
 {
     return(ProductList[ProductList.IndexOf(product)]);
 }
示例#7
0
 public void AddProduct(ProductClass product)
 {
     ProductList.Add(product);
 }
示例#8
0
        public override bool Equals(object obj)
        {
            ProductClass product = (ProductClass)obj;

            return(ProductID.Equals(product.ProductID));
        }
示例#9
0
 public PriceTable(ProductClass product, int amount, double price)
 {
     Product = product;
     Amount  = amount;
     Price   = price;
 }