public LabelInspectionManager(IDbContextLabelInsp db)
        {
            labelsToBeInspected = new ConcurrentQueue <string>();
            uow           = new UnitOfWorkLabelInsp(db);
            imgProcessing = new ImageProcessing();

            RAW_LABELS_PATH        = @"C:\inetpub\wwwroot\LABELINSP_DATA\RawLabels\";
            INSPECTED_LABELS_PATH  = @"C:\inetpub\wwwroot\LABELINSP_DATA\InspectedLabels\";
            INVALID_LABELS_PATH    = @"C:\inetpub\wwwroot\LABELINSP_DATA\InvalidLabels\";
            WORKORDERS_LABELS_PATH = @"C:\inetpub\wwwroot\LABELINSP_DATA\WorkordersLabels\";

            ConnectionParameters cp = new ConnectionParameters();

            cp.RawLabelsPath = RAW_LABELS_PATH;
            cp.DbSever       = @"192.168.0.221\SQLEXPRESS";
            cp.DbName        = "LabelPrinter_2";
            cp.DbUser        = "******";
            cp.DbPassword    = "******";
            cp.PrinterS      = "192.168.0.216";
            cp.PrinterR      = "192.168.0.217";
            cp.PrinterF      = "192.168.0.218";

            ConnectionParameters cp2 = new ConnectionParameters();

            cp2.RawLabelsPath = RAW_LABELS_PATH;
            cp2.DbSever       = @"192.168.0.220\SQLEXPRESS";
            cp2.DbName        = "LabelPrinter_1";
            cp2.DbUser        = "******";
            cp2.DbPassword    = "******";
            cp2.PrinterS      = "192.168.0.211";
            cp2.PrinterR      = "192.168.0.214";
            cp2.PrinterF      = "192.168.0.213";

            ConnectionParameters cp3 = new ConnectionParameters();

            cp3.RawLabelsPath = RAW_LABELS_PATH;
            cp3.DbSever       = @"192.168.0.210";
            cp3.DbName        = "LabelPrinter_3";
            cp3.DbUser        = "******";
            cp3.DbPassword    = "******";
            cp3.PrinterS      = "192.168.0.242";
            cp3.PrinterR      = "192.168.0.240";
            cp3.PrinterF      = "192.168.0.241";

            LabelsDownloaders = new List <LabelsDownloader>();
            LabelsDownloaders.Add(new LabelsDownloader(cp));
            LabelsDownloaders.Add(new LabelsDownloader(cp2));
            LabelsDownloaders.Add(new LabelsDownloader(cp3));

            foreach (var ld in LabelsDownloaders)
            {
                ld.RegisterObserver(this);
            }
            //LabelsDownloaders.Add(new LabelsDownloader(cp3));
        }
        public LabelInspectionManager(IDbContextLabelInsp db, bool isTest)
        {
            this.isTest         = true;
            labelsToBeInspected = new ConcurrentQueue <string>();
            uow           = new UnitOfWorkLabelInsp(db);
            imgProcessing = new ImageProcessing();

            RAW_LABELS_PATH        = @"C:\inetpub\wwwroot\LABELINSP_DATA\TestLabels\";
            INSPECTED_LABELS_PATH  = @"C:\inetpub\wwwroot\LABELINSP_DATA\TestLabels\InspectedLabels\";
            INVALID_LABELS_PATH    = @"C:\inetpub\wwwroot\LABELINSP_DATA\TestLabels\";
            WORKORDERS_LABELS_PATH = @"C:\inetpub\wwwroot\LABELINSP_DATA\WorkordersLabels\";
        }
Example #3
0
 public WorkorderLabelRepo(IDbContextLabelInsp db) : base(db)
 {
     this.db = db;
 }
 public QualityController(IDbContextLabelInsp db)
 {
     this.db      = db;
     ViewBag.Skin = "nasaSkin";
     uow          = new UnitOfWorkLabelInsp(db);
 }
 public UnitOfWorkLabelInsp(IDbContextLabelInsp db) : base(db)
 {
     this.db = db;
 }
 public ItemDataRepo(IDbContextLabelInsp db) : base(db)
 {
     this.db = db;
 }