internal Fuel(FuelCard fuelCard, DateTime date, EngineType engineType) { FuelCard = fuelCard; Date = date; EngineType = engineType; Value = 0; }
public void Add(EngineType engineType) { if (list.Exists(et => et.ID == engineType.ID)) return; list.Add(engineType); }
protected override void loadFromSql() { DataTable dt = _provider.Select("EngineType"); foreach (DataRow row in dt.Rows) { EngineType engineType = new EngineType(row); Add(engineType); } }
static FuelLoader() { erorrs = new List<string>(); fuelCardList = FuelCardList.getInstance(); engineTypeList = EngineTypeList.getInstance(); benzin = engineTypeList.getItem(BENZIN_ID); disel = engineTypeList.getItem(DIESEL_ID); loaders = new Dictionary<FuelReport, Action<ExcelDoc>>(); loaders.Add(FuelReport.Петрол, LoadPetrol); loaders.Add(FuelReport.Neste, LoadNeste); loaders.Add(FuelReport.Чеки, LoadChecks); }