//WVWZZZ1KZ4B002803 public VINCarInfo DecodeVINNumber(string vin) { vin = vin.ToUpper(); VINCarInfo retval = new VINCarInfo(); if (vin.Length != 17) return retval; retval.PlantInfo = decodePlantInfo(vin); retval.Concern = decodeConcern(vin); retval.Makeyear = decodeMakeYear(vin); string platform = string.Empty; string make = string.Empty; retval.Model = decodeModel(vin, retval.Makeyear, out platform, out make); retval.Platform = platform; retval.Make = make; retval.EngineType = decodeEngineType(vin); retval.Valid = true; return retval; }
private void DecodeVIN() { lblCarMake.Text = "---"; lblCarModel.Text = "---"; lblMakeyear.Text = "---"; lblPlant.Text = "---"; lblChassis.Text = "---"; lblEngineType.Text = "---"; VINDecoder decoder = new VINDecoder(); VINCarInfo carinfo = decoder.DecodeVINNumber(textEdit1.Text); //lblBody.Text = carinfo.Body; lblCarMake.Text = carinfo.Make; lblCarModel.Text = carinfo.Model; lblMakeyear.Text = carinfo.Makeyear.ToString(); lblPlant.Text = carinfo.PlantInfo; lblChassis.Text = carinfo.Platform; lblEngineType.Text = carinfo.EngineType; }
//WVWZZZ1KZ4B002803 public VINCarInfo DecodeVINNumber(string vin) { vin = vin.ToUpper(); VINCarInfo retval = new VINCarInfo(); if (vin.Length != 17) { return(retval); } retval.PlantInfo = decodePlantInfo(vin); retval.Concern = decodeConcern(vin); retval.Makeyear = decodeMakeYear(vin); string platform = string.Empty; string make = string.Empty; retval.Model = decodeModel(vin, retval.Makeyear, out platform, out make); retval.Platform = platform; retval.Make = make; retval.EngineType = decodeEngineType(vin); retval.Valid = true; return(retval); }