public ActionResult AddConfigurationAttribute(string error = "") { List<ConfigAttributeType> configtypes = new ACES().GetConfigTypes(); ViewBag.configtypes = configtypes; ViewBag.error = error; return View("EditConfigurationAttribute"); }
public string addConfig(int BaseVehicleID, int SubmodelID, string configs = "") { ACESBaseVehicle basevehicle = new ACESBaseVehicle(); List<int> configids = new List<int>(); if (configs != "") { configids = configs.Split(',').Select(s => int.Parse(s)).ToList(); basevehicle = new ACES().addConfig(BaseVehicleID, SubmodelID, configids); } else { new ACES().AddSubmodel(BaseVehicleID, SubmodelID); basevehicle = new ACES().GetVehicle(BaseVehicleID,SubmodelID); } return JsonConvert.SerializeObject(basevehicle); }
public string GetConfigsByVehicle(int id) { ACESVehicleOptions configs = new ACESVehicleOptions(); configs = new ACES().getVehicleConfigs(id); return JsonConvert.SerializeObject(configs); }
public ActionResult EditACESVehicles(int partID = 0) { // Get the part ConvertedPart part = ProductModels.GetPart(partID); ViewBag.part = part; // Get the vehicles that are tied to this part List<ACESBaseVehicle> part_vehicles = new List<ACESBaseVehicle>(); part_vehicles = new ACES().GetVehiclesByPart(partID); ViewBag.part_vehicles = part_vehicles; List<vcdb_Make> makes = new ACES().GetMakes(); ViewBag.makes = makes; ViewBag.active_tab = "acesvehicles"; return View(); }
public ActionResult AddConfigurationType(string error = "") { ViewBag.error = error; List<AcesType> acestypes = new ACES().GetACESTypes(); ViewBag.acestypes = acestypes; return View("EditConfigurationType"); }
public string UpdateSubmodel(int id, string name) { Submodel s = new ACES().UpdateSubmodel(id, Uri.UnescapeDataString(name)); return JsonConvert.SerializeObject(s); }
public string UpdateMake(int id, string name) { vcdb_Make m = new ACES().UpdateMake(id,name); return JsonConvert.SerializeObject(m); }
public ActionResult SaveConfigurationType(int id = 0, string name = null, int? acestypeid = null) { ConfigAttributeType type = new ConfigAttributeType(); string error = ""; try { type = new ACES().SaveConfigurationType(id, name, acestypeid); } catch (Exception e) { error = e.Message; if (id == 0) { return RedirectToAction("AddConfigurationType", new { error = error }); } else { return RedirectToAction("EditConfigurationType", new { id = id, error = error }); } } return RedirectToAction("ConfigTypes"); }
public string GetVehicleParts(int vehicleID, int baseVehicleID, int submodelID) { List<vcdb_VehiclePart> parts = new List<vcdb_VehiclePart>(); try { if (vehicleID != 0) { parts = new ACES().GetVehicleParts(vehicleID); } else { parts = new ACES().GetVehicleParts(baseVehicleID, submodelID); } } catch { } return JsonConvert.SerializeObject(parts); }
public string GetVCDBVehicles(int makeid, int modelid) { List<VCDBBaseVehicle> vehicles = new List<VCDBBaseVehicle>(); vehicles = new ACES().GetVCDBVehicles(makeid, modelid); return JsonConvert.SerializeObject(vehicles); }
public string GetVCDBModels(int id = 0) { List<AAIA.Model> models = new ACES().GetVCDBModels(id); return JsonConvert.SerializeObject(models); }
public string GetNotes(int id) { List<Note> notes = new List<Note>(); try { notes = new ACES().getNotes(id); } catch { } return JsonConvert.SerializeObject(notes); }
public string getNonACESConfigurationTypes(int id) { List<ConfigAttributeType> types = new List<ConfigAttributeType>(); types = new ACES().getNonACESConfigurationTypes(id); return JsonConvert.SerializeObject(types); }
/*Aces Type methods */ public ActionResult AcesTypes() { List<AcesType> types = new ACES().GetACESTypes(); ViewBag.types = types; return View(); }
public string GetModels(int id) { List<vcdb_Model> models = new ACES().GetModels(id); return JsonConvert.SerializeObject(models); }
public ActionResult SaveACESType(int id = 0, string name = null) { CurtDevDataContext db = new CurtDevDataContext(); AcesType type = new AcesType(); string error = ""; try { type = new ACES().SaveACESType(id, name); } catch (Exception e) { error = e.Message; if (id == 0) { return RedirectToAction("AddACESType", new { error = error }); } else { return RedirectToAction("EditACESType", new { id = id, error = error }); } } return RedirectToAction("AcesTypes"); }
public ActionResult SaveConfigurationAttribute(int id = 0, string value = null, int configtypeid = 0) { ConfigAttribute attribute = new ConfigAttribute(); string error = ""; try { attribute = new ACES().SaveConfigurationAttr(id, value, configtypeid); } catch (Exception e) { error = e.Message; if (id == 0) { return RedirectToAction("AddConfigurationAttribute", new { error = error }); } else { return RedirectToAction("EditConfigurationAttribute", new { id = id, error = error }); } } return RedirectToAction("ConfigAttributes"); }
public string GetVehicles(int makeid, int modelid, int partID = 0) { List<ACESBaseVehicle> vehicles = new List<ACESBaseVehicle>(); vehicles = new ACES().GetVehicles(makeid, modelid, partID); return JsonConvert.SerializeObject(vehicles); }
public string AddBaseVehicle(int id) { vcdb_Vehicle vehicle = new vcdb_Vehicle(); vehicle = new ACES().AddBaseVehicle(id); return JsonConvert.SerializeObject(vehicle); }
public string GetYears() { List<int> years = new ACES().GetYears(); return JsonConvert.SerializeObject(years); }
public string UpdateModel(int id, string name) { vcdb_Model m = new ACES().UpdateModel(id, Uri.UnescapeDataString(name)); return JsonConvert.SerializeObject(m); }
public string MapPart(int id) { List<Vehicles> unmapped = new ACES().MapPart(id); return JsonConvert.SerializeObject(unmapped); }
public ActionResult Vehicles() { List<vcdb_Make> makes = new ACES().GetMakes(); ViewBag.makes = makes; return View(); }
public string mergeVehicles(int targetID, int currentID, bool deleteCurrent = true) { ACESBaseVehicle basevehicle = new ACESBaseVehicle(); basevehicle = new ACES().mergeVehicles(targetID, currentID, deleteCurrent); return JsonConvert.SerializeObject(basevehicle); }
public string removeAttribute(int vehicleID, int attributeID) { ACESBaseVehicle basevehicle = new ACESBaseVehicle(); basevehicle = new ACES().removeAttribute(vehicleID, attributeID); return JsonConvert.SerializeObject(basevehicle); }
public string addAttributeToVehicle(int vehicleID, int vcdbID, int typeID, string value) { ACESBaseVehicle basevehicle = new ACESBaseVehicle(); basevehicle = new ACES().addAttributeToVehicle(vehicleID, vcdbID, typeID, value); return JsonConvert.SerializeObject(basevehicle); }
public string AddCustomConfig(int vehicleID, int attrID) { ACESBaseVehicle basevehicle = new ACESBaseVehicle(); basevehicle = new ACES().addCustomConfig(vehicleID, attrID); return JsonConvert.SerializeObject(basevehicle); }
public ActionResult RunCheck() { int vehicles = new ACES().RunCheck(); return RedirectToAction("RunVehicleCheck", new { updatedVehicles = vehicles }); }
public string GetPartVehicles(int partID = 0) { List<ACESBaseVehicle> part_vehicles = new List<ACESBaseVehicle>(); part_vehicles = new ACES().GetVehiclesByPart(partID); return JsonConvert.SerializeObject(part_vehicles); }
public string GetConfigs(int BaseVehicleID, int SubmodelID) { ACESVehicleOptions configs = new ACESVehicleOptions(); configs = new ACES().getVehicleConfigs(BaseVehicleID, SubmodelID); return JsonConvert.SerializeObject(configs); }