Esempio n. 1
0
        /*
         * 2. System will check the "Due Date" of the item by looking in the DueDate column of the Table dbo.AutoSort of the assembly database.
         * Software is looking for a "current or future due date".  In other words On Monday July 22nd any pieces scanned must be due 
         * Monday July 22nd or later ( Tue the 23rd....etc.....).  The DueDate column of the table dbo.AutoSort has date, 
         * BUT NOT day of week information.  Any piece that has a prior due date to the current date will be treated as a
         * same day or current day order.  
         */
        public Bin getBinGSS(Category cat, AutoSortInfo autoSort)
        {

            int dayofweek = -1;
            int bin = -1;
            if (autoSort.Duedate < DateTime.Now)
                dayofweek = (int)DateTime.Now.DayOfWeek;
            else
            {
                dayofweek = (int)((DateTime)autoSort.Duedate).DayOfWeek;
            }
            bin = dayofweek;
            int RFIDlen = autoSort.rfid.Length;
            bool route = false;
            for (int i = 0; i < autoSort.rfid.Length; i++)
            {
                if (autoSort.rfid[i] != ' ')
                {
                    route = true;
                    break;
                }

            }
            if (route)
            {
                if (dayofweek == 3 || dayofweek == 5)
                    bin = 6;
                else if (dayofweek == 1 || dayofweek == 4)
                    bin = 7;

            }
            return CleaningBins.Where(i => i.PhidgetSlot == bin - 1).SingleOrDefault();
        }
Esempio n. 2
0
 public void GetOurEntities()
 {
     logger.Info("GetOurEntities ");
     //  try
     // {
     CleaningCats = db.GetBCSCats(out DBerrormsg);
     // }
     if (DBerrormsg.Count() > 2)
     {
         return;
     }
     //           Items = db.GetItems();
     CleaningBins = db.GetBins();
     unknownCat   = CleaningCats.Where(c => c.Name.StartsWith("Unclassified")).Single();
 }
Esempio n. 3
0
        public Bin getBin(Category cat, AutoSortInfo auto)
        {
            return CleaningBins.Where(i => i.Category.ID == cat.ID).SingleOrDefault();

        }
Esempio n. 4
0
        public void GetOurEntities()
        {
            logger.Info("GetOurEntities ");
             CleaningCats = db.GetCats(out DBerrormsg);
            if (DBerrormsg.Count() > 2)
            {
  //              MessageBox.Show("Cound not open Categories DataBase");
               
                return;
            }
 //           Items = db.GetItems();
            CleaningBins = db.GetBins();
            unknownCat = CleaningCats.Where(c => c.Name.StartsWith("Unclassified")).Single();
        }