This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DECLARE @CursorVar1 CURSOR | |
| DECLARE @CurrentVehicle int | |
| DECLARE @CurrentYear int | |
| DECLARE @CurrentMake int | |
| DECLARE @CurrentModel int | |
| SET @CursorVar1 = CURSOR SCROLL DYNAMIC | |
| FOR | |
| select AAIABaseVehicleID, AAIAYearID, AAIAMakeID, AAIAModelID from AAIABaseVehicle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE VehicleConfig ( | |
| ID int IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
| AAIAVehicleConfigID int NOT NULL | |
| ) | |
| GO | |
| CREATE TABLE vcdb_VehiclePart ( | |
| ID int IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
| BaseVehicleID int NOT NULL FOREIGN KEY REFERENCES BaseVehicle (ID), | |
| SubmodelID int NOT NULL FOREIGN KEY REFERENCES Submodel (ID), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE vcdb_VehiclePart ( | |
| ID int IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
| BaseVehicleID int NOT NULL FOREIGN KEY REFERENCES BaseVehicle (ID), | |
| SubmodelID int NOT NULL FOREIGN KEY REFERENCES Submodel (ID), | |
| PartNumber int NOT NULL, | |
| VehicleConfigID int NULL FOREIGN KEY REFERENCES VehicleConfig (ID) | |
| ) | |
| GO | |
| CREATE TABLE VehicleConfig ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select V.VehicleID, V.BaseVehicleID FROM | |
| Vehicle AS V | |
| INNER JOIN BaseVehicle ON V.BaseVehicleID = BaseVehicle.BaseVehicleID | |
| INNER JOIN Year ON BaseVehicle.YearID = Year.YearID | |
| INNER JOIN Make ON BaseVehicle.MakeID = Make.MakeID | |
| INNER JOIN Model ON BaseVehicle.ModelID = Model.ModelID | |
| INNER JOIN Submodel ON V.SubmodelID = Submodel.SubmodelID | |
| WHERE Year.YearID = 2006 AND Make.MakeName = 'Honda' AND Model.ModelName = 'Element' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| vehicle = (from ve in db2.vcdb_Vehicles | |
| where ve.VehicleConfig.VehicleConfigAttributes.Count.Equals(vehicleAttribs.Count) | |
| && ve.VehicleConfig.VehicleConfigAttributes.All(p => attrIDs.Contains(p.AttributeID)) | |
| select ve).First<vcdb_Vehicle>(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List<Part> parts = new List<Part>(); | |
| int partcount = db.CustomerReportParts.Where(x => x.customerID.Equals(customerID)).Select(x => x.partID).Count(); | |
| if (start == null) { | |
| if (partcount == 0) { | |
| parts = db.Parts.OrderBy(x => x.partID).ToList<Part>(); | |
| } else { | |
| parts = (from p in db.Parts | |
| join crp in db.CustomerReportParts on p.partID equals crp.partID | |
| orderby p.partID |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <ul class="vehicles" id="vehicleData"> | |
| @foreach(CurtAdmin.BaseVehicle bv in vehicles) { | |
| <li>@bv.YearID @bv.vcdb_Make.MakeName @bv.vcdb_Model.ModelName | |
| <ul class="submodels"> | |
| @foreach(CurtAdmin.Submodel s in bv.vcdb_Vehicles.Where(x => x.SubModelID != null).Select(x => x.Submodel).Distinct().OrderBy(x => x.SubmodelName)) { | |
| <li>@s.SubmodelName | |
| @if(bv.vcdb_Vehicles.Where(x => x.SubModelID.Equals(s.ID)).Any(x => x.ConfigID != null)) { | |
| <a href="#" class="showConfig">Show Configs</a> | |
| <table class="configs"> | |
| <thead> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| internal ACESConfigs getVehicleConfigs(int BaseVehicleID, int SubmodelID) { | |
| ACESConfigs acesconfigs = new ACESConfigs(); | |
| CurtDevDataContext db = new CurtDevDataContext(); | |
| AAIA.VCDBDataContext vcdb = new AAIA.VCDBDataContext(); | |
| try { | |
| BaseVehicle bv = db.BaseVehicles.Where(x => x.ID.Equals(BaseVehicleID)).First<BaseVehicle>(); | |
| Submodel submodel = db.Submodels.Where(x => x.ID.Equals(SubmodelID)).First<Submodel>(); | |
| List<ConfigAttributeType> attrtypes = db.ConfigAttributeTypes.Where(x => x.AcesTypeID != null).OrderBy(x => x.sort).ToList<ConfigAttributeType>(); | |
| List<AAIA.VehicleConfig> configs = vcdb.VehicleConfigs.Where(x => x.Vehicle.BaseVehicleID.Equals(bv.AAIABaseVehicleID) && x.Vehicle.SubmodelID.Equals(submodel.AAIASubmodelID)).Distinct().OrderBy(x => x.BodyStyleConfig.BodyTypeID).ToList<AAIA.VehicleConfig>(); | |
| acesconfigs.configs = configs; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE LandingPage ( | |
| id int IDENTITY(1,1) PRIMARY KEY NOT NULL, | |
| websiteID int NOT NULL FOREIGN KEY REFERENCES Website(ID), | |
| startDate datetime NOT NULL, | |
| endDate datetime NOT NULL, | |
| url varchar(255) NOT NULL, | |
| banner varchar(255) NULL, | |
| pageContent text NULL, | |
| buttonClasses varchar(255) NULL, | |
| buttonText varchar(255) NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static FreightClassType getFreightClass(double density) { | |
| if (density < 1) { | |
| return FreightClassType.CLASS_500; | |
| } else if (density >= 1 && density < 2) { | |
| return FreightClassType.CLASS_400; | |
| } else if (density >= 2 && density < 3) { | |
| return FreightClassType.CLASS_300; | |
| } else if (density >= 3 && density < 4) { | |
| return FreightClassType.CLASS_250; | |
| } else if (density >= 4 && density < 5) { |
OlderNewer