Exemple #1
0
        // ja - constructor with known column names
        public int AddPrintJobWithColumns(PrinterArea eArea, LabelTypes eLabelType, List <string> sColumns)
        {
            // ja - create data class (container for 3 other classes)
            DropFileData df = new DropFileData(eArea, eLabelType);

            // ja - set the columns names
            df.SetColumnNames(sColumns);

            DropFileDataList.Add(df);

            return(DropFileDataList.Count);
        }
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);
        }
Exemple #3
0
        private List <string> CreateFileContents(DropFileData data)
        {
            List <string> theData = new List <string>();

            // ja - add bartender header
            theData.Add(data.GetHeaderString());

            // ja - add blank line
            theData.Add(DropFileHeader.GetNewLine());

            // ja - add columns
            theData.Add(data.GetColumnString());

            // ja - add the data rows
            theData.Add(data.GetDataString());

            return(theData);
        }