public static ResponseCodes DeleteRecord(int id) { Request request = new Request(RequestTypes.DELETE, id); Response response = DatabaseInteractor.HandleRequest(request); return(response.ResponseCode); }
public static ResponseCodes CreateRecord(int id, DateTime dt, double val) { Request request = new Request(RequestTypes.CREATE, id, dt, val); Response response = DatabaseInteractor.HandleRequest(request); return(response.ResponseCode); }
public static ResponseCodes ReadRecord(int id, out DateTime dt, out double val) { Request request = new Request(RequestTypes.READ, id); Response response = DatabaseInteractor.HandleRequest(request); dt = response.Datetime; val = response.Value; return(response.ResponseCode); }
static void Main(string[] args) { try { DatabaseInteractor.Open("../../../input.csv"); UserLayer.Interpret(); } catch (Exception exc) { Console.WriteLine($"Ошибка: {exc.Message}"); } finally { DatabaseInteractor.Save(); } }