Exemple #1
0
        public void AddDataRowFromDB(List <string> sSerials)
        {
            foreach (string serial in sSerials)
            {
                for (int i = 0; i < DropFileDataList.Count; i++)
                {
                    // ja - create a generic struct
                    LabelDataStruct SerialLabelData = new LabelDataStruct();

                    // ja - fill the struct with the workcode data for each job
                    SerialLabelData = DropFileDataList[i].GetWorkCodeLabel().GetWorkCodeData();

                    // ja - assign a specific serial number
                    SerialLabelData.SerialNumber = serial;

                    // ja - get the customer name
                    string sCustomerName = DropFileDataList[i].GetCustomerName();

                    // ja - convert the generic struct to PM Label Data to massage the data for different label types (such as Philips)
                    PMLabelData labelData = new PMLabelData(SerialLabelData, sCustomerName);

                    // ja - add the formatted data back to the jobs list
                    AddDataRow(i + 1, labelData.GetValueList());
                }
            }
        }
Exemple #2
0
        // ja - constructor for generic PM column names
        public bool AddPrintJobForPM(PrinterArea eArea, string sWorkCode)
        {
            bool bFoundPart = false;

            WorkCodeLabel wc = new WorkCodeLabel(sWorkCode);

            string sFomattedVer = ConfigValues.ConvertIntVersion(wc.GetWorkCodeData().nVersion);

            // TODO: ja - test for no version

            AssignedLabelTypes lt;

            // ja - read from Label Codes from the Database
            if (ConfigValues.UseNewLabelCodes)
            {
                lt = new AssignedLabelTypes(eArea, wc.GetWorkCodeData().PartNumber, sFomattedVer);
            }
            else // ja - read from LabelsCode in Workcode Table
            {
                lt = new AssignedLabelTypes(wc.GetLabelsCode(), eArea, wc.GetWorkCodeData().PartNumber);
            }

            // ja - need to fill the data for all labels type to print
            foreach (var LabelProperty in lt.AssignedLabels)
            {
                DropFileData df = new DropFileData(eArea, LabelProperty.AssingedLabel);

                df.SetPrintQuanity(LabelProperty.LabelQuanity);

                df.SetCustomerName(LabelProperty.CustomerName);

                // ja - add the data to the job
                df.SetWorkCodeData(wc);

                // ja - add the column names
                df.SetColumnNames(PMLabelData.GetPMColumnHeaders());

                // ja - add the job
                DropFileDataList.Add(df);

                bFoundPart = true;
            }

            return(bFoundPart);
        }