Example #1
0
        private List<DDDClass.VehicleRegistrationIdentification> GetVehicleRegistrationIdentification(int dataBlockId, string paramName)
        {
            DDDClass.VehicleRegistrationIdentification vehicleRegistrationIdentification = new DDDClass.VehicleRegistrationIdentification();
            List<DDDClass.VehicleRegistrationIdentification> vehicleRegistrationIdentificationList = new List<DDDClass.VehicleRegistrationIdentification>();
            SQLDB_Records sqldbRecords = new SQLDB_Records(connectionString, sqlDB.GETMYSQLCONNECTION());
            string currentParamName;
            System.Text.UTF8Encoding enc = new System.Text.UTF8Encoding();
            byte[] _bytes;
            List<string> vehicleRegistrationNumber = new List<string>();
            List<string> vehicleRegistrationNation = new List<string>();

            currentParamName = paramName + ".vehicleRegistrationNumber.vehicleRegNumber";
            vehicleRegistrationNumber = sqldbRecords.Get_AllParamsArray(dataBlockId, currentParamName);

            currentParamName = paramName + ".vehicleRegistrationNation";
            vehicleRegistrationNation = sqldbRecords.Get_AllParamsArray(dataBlockId, currentParamName);

            if (vehicleRegistrationNumber.Count == vehicleRegistrationNation.Count)
            {
                for (int i = 0; i < vehicleRegistrationNumber.Count; i++)
                {
                    vehicleRegistrationIdentification = new DDDClass.VehicleRegistrationIdentification();

                    vehicleRegistrationIdentification.vehicleRegistrationNation = new DDDClass.NationNumeric(Convert.ToInt16(vehicleRegistrationNation[i]));

                    _bytes = enc.GetBytes(vehicleRegistrationNumber[i]);
                    vehicleRegistrationIdentification.vehicleRegistrationNumber.vehicleRegNumber = _bytes;

                    vehicleRegistrationIdentificationList.Add(vehicleRegistrationIdentification);
                }
            }
            return vehicleRegistrationIdentificationList;
        }
Example #2
0
        public DDDClass.VehicleRegistrationIdentification Get_VehicleOverview_RegistrationIdentification(int dataBlockId)
        {
            DDDClass.VehicleRegistrationIdentification vehicleRegistrationIdentification = new DDDClass.VehicleRegistrationIdentification();

            vehicleRegistrationIdentification.vehicleRegistrationNation = Get_VehicleOverview_RegistrationNation(dataBlockId);
            vehicleRegistrationIdentification.vehicleRegistrationNumber = Get_VehicleOverview_RegistrationNumber(dataBlockId);

            return vehicleRegistrationIdentification;
        }