// ja - This function was added specifically to get information from the parts table to
        //      populate RMA data from a different part
        public RmaOverrides GetRMADataFromPartsInfo(string sPartNumber, string sVersion)
        {
            RmaOverrides rma = new RmaOverrides();

            try
            {
                PartsTable pt = new PartsTable(sPartNumber, sVersion);

                rma.InputSpecs  = pt.GetValue("Inspecs");
                rma.OutputSpecs = pt.GetValue("Outspecs");
                rma.RevLetter   = pt.GetValue("Revision");
            }
            catch (Exception)
            {
                throw;
            }

            return(rma);
        }
示例#2
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");
                }
            }
        }