Exemple #1
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);
        }
 // ja - setters
 public void SetWorkCodeData(WorkCodeLabel wcLabel)
 {
     WorkCodeLabelObj = wcLabel;
 }