private WaterImportProc getWaterModel() { WaterImportProc model = new WaterImportProc(); WaterDataImporter importer = WaterDataImporter.getInstance(); model.Running = importer.ImportRunning; model.EndDate = importer.LastDate; return(model); }
public ActionResult StartWaterImport(string type) { WaterImportProc model = getWaterModel(); model.Running = true; if (type.Equals("full")) { WaterDataImporter.getInstance().ResetAllWaterData(); } else { WaterDataImporter.getInstance().UpdateWaterData(); } return(PartialView("_WaterImportPartial", model)); }