public static string RemovePath(string fileName, Constants.FilePart part) { int num = fileName.LastIndexOf("\\"); if (part == Constants.FilePart.File) { if (num != 0) { return fileName.Substring(num + 1); } num = fileName.LastIndexOf("/"); if (num != 0) { return fileName.Substring(num + 1); } return fileName; } else { if (num != 0) { return fileName.Substring(0, num); } num = fileName.LastIndexOf("/"); if (num != 0) { return fileName.Substring(0, num); } return ""; } }
public static DataSet GetVehicleBuild(Constants.ModelCriteria model) { StoredProc storedProc = new StoredProc("upGetVehicleBuildByModel"); storedProc.StoredProcParams.Add(new StoredProcParam("@ModelID", model.ID.ToString())); return storedProc.ExecuteDataSet(); }
public static void DeleteVehicleInst(Constants.VehicleCriteria vehicle) { StoredProc storedProc = new StoredProc("upDeleteVehicleInstByVehicle"); storedProc.StoredProcParams.Add(new StoredProcParam("@VehicleBuildID", vehicle.ID.ToString())); storedProc.Execute(); }
public static DataSet GetVehicleBuild(Constants.VehicleCriteria vehicle) { StoredProc storedProc = new StoredProc("upGetVehicleBuildByVehicle"); storedProc.StoredProcParams.Add(new StoredProcParam("@VehicleID", vehicle.ID.ToString())); return storedProc.ExecuteDataSet(); }
public static void ChangeBuildTypeOrder(int vehicleId, int buildTypeId, Constants.Movement move, string user) { StoredProc storedProc = new StoredProc("upChangeBuildTypeOrder"); storedProc.StoredProcParams.Add(new StoredProcParam("@VehicleID", vehicleId.ToString())); storedProc.StoredProcParams.Add(new StoredProcParam("@BuildTypeID", buildTypeId.ToString())); ArrayList arg_5E_0 = storedProc.StoredProcParams; string arg_59_0 = "@Movement"; int num = (int)move; arg_5E_0.Add(new StoredProcParam(arg_59_0, num.ToString())); storedProc.StoredProcParams.Add(new StoredProcParam("@User", user.ToString())); storedProc.Execute(); }
public static DataSet GetFrame(Constants.BuildTypeCriteria buildType) { StoredProc storedProc = new StoredProc("upGetFramesByBuildType"); storedProc.StoredProcParams.Add(new StoredProcParam("@BuildTypeID", buildType.ID.ToString())); return storedProc.ExecuteDataSet(); }
public static DataSet GetModule(Constants.VehicleInstCriteria vInst) { StoredProc storedProc = new StoredProc("upGetModulesByVehicleInstance"); storedProc.StoredProcParams.Add(new StoredProcParam("@VehicleInstID", vInst.ID.ToString())); return storedProc.ExecuteDataSet(); }