/// <summary> /// Retrieves the date of the tariff before the most recent, used when editing the current tariff. /// </summary> /// <param name="meterId"></param> /// <returns>JSON representation of date string, wrapped in EMResponse</returns> public string getMinimumTariffDateForEdit(int meterId) { EMResponse response = new EMResponse(); try { tariffMgr = new TariffManager(); response.data = EMConverter.fromObjectToJSON(tariffMgr.getMinimumTariffDateForEdit(meterId)); response.status = ok; } catch (Exception e) { response.status = error; response.data = e.Message; } return EMConverter.fromObjectToJSON(response); }