示例#1
0
        private void FillLabelDataGeneric()
        {
            _wcLabelData = new LabelDataStruct();


            string sPartNumber = "111";

            _wcLabelData.PartNumber = sPartNumber;
            _wcLabelData.ROHS       = true;
            //string sVersion = "0.01";
            _wcLabelData.nQty = 1;

            _wcLabelData.nVersion = 1;


            _wcLabelData.EtherCat    = true;
            _wcLabelData.UL          = true;
            _wcLabelData.InputSpecs  = "Input";
            _wcLabelData.OutputSpecs = "Output";
            _wcLabelData.RevLetter   = "A";
            _wcLabelData.CE          = true;
            _wcLabelData.ProtoType   = true;

            // ja - internal use
            _wcLabelData.BaseModel   = "111";
            _wcLabelData.Extension   = "111";
            _wcLabelData.sLabelsCode = "10-1, 20-1, 50-1, 100-1";
        }
示例#2
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());
                }
            }
        }
示例#3
0
        public PMLabelData(LabelDataStruct theRawData, string sCustomerName)
        {
            if (string.IsNullOrEmpty(sCustomerName))
            {
                sCustomerName = "AMC";
            }

            _CustomerName = sCustomerName;

            SerialNumber = theRawData.SerialNumber;
            PartNumber   = theRawData.PartNumber;

            DateCode = theRawData.DateCode;

            nVersion = theRawData.nVersion;

            RevLetter    = theRawData.RevLetter;
            sInputSpecs  = theRawData.InputSpecs;
            sOutputSpecs = theRawData.OutputSpecs;

            bEtherCat  = theRawData.EtherCat;
            bUL        = theRawData.UL;
            bCE        = theRawData.CE;
            bProtoType = theRawData.ProtoType;
            bROHS      = theRawData.ROHS;
            Tuv        = theRawData.Tuv;

            // ja - internal use for rev letter
            sBaseModel = theRawData.BaseModel;
            sExtension = theRawData.Extension;
        }
        public LabelDataStruct GetWorkCodeData()
        {
            var data = printJobs.DropFileDataList[0];

            LabelDataStruct x = data.WorkCodeLabelObj.GetWorkCodeData();

            string s = x.PartNumber;

            return(x);
        }
示例#5
0
        private void FillLabelData()
        {
            _wcLabelData = new LabelDataStruct();

            Workcode wc = new Workcode(WorkCode);

            if (wc.KeyFound())
            {
                string sPartNumber = wc.GetValue(wc.MODELLCODE).Trim();
                _wcLabelData.PartNumber = sPartNumber;
                _wcLabelData.ROHS       = Convert.ToBoolean(wc.GetValue("Rohasyorn"));

                string sVersion = wc.GetValue(wc.AMPVERSION);
                _wcLabelData.nQty = Convert.ToInt32(wc.GetValue("Quantity"));

                // ja - separate the 0. from the 00
                string[] sStrippedVersion = sVersion.Split('.');
                if (sStrippedVersion.Count() > 1)
                {
                    _wcLabelData.nVersion = Convert.ToInt32(sStrippedVersion[1]);
                }

                PartsTable pt = new PartsTable(sPartNumber, sVersion);

                if (pt.KeyFound())
                {
                    _wcLabelData.EtherCat    = Convert.ToBoolean(pt.GetValue("Ethercat"));
                    _wcLabelData.UL          = Convert.ToBoolean(pt.GetValue("UL"));
                    _wcLabelData.InputSpecs  = pt.GetValue("Inspecs").Trim();
                    _wcLabelData.OutputSpecs = pt.GetValue("Outspecs").Trim();
                    _wcLabelData.RevLetter   = pt.GetValue("Revision").Trim();
                    _wcLabelData.CE          = Convert.ToBoolean(pt.GetValue("Emc"));
                    _wcLabelData.ProtoType   = Convert.ToBoolean(pt.TableName == "Proto");

                    // ja - internal use
                    _wcLabelData.BaseModel   = pt.GetValue("BaseModel").Trim();
                    _wcLabelData.Extension   = pt.GetValue("Extension").Trim();
                    _wcLabelData.sLabelsCode = pt.GetValue("Labelscode");
                }
            }
        }
 // ja - need to manipulate the data for RMA's
 public void ModifyRMAData(LabelDataStruct newData)
 {
     // ??
 }