예제 #1
0
        public static ResponseCodes DeleteRecord(int id)
        {
            Request  request  = new Request(RequestTypes.DELETE, id);
            Response response = DatabaseInteractor.HandleRequest(request);

            return(response.ResponseCode);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
 static void Main(string[] args)
 {
     try
     {
         DatabaseInteractor.Open("../../../input.csv");
         UserLayer.Interpret();
     }
     catch (Exception exc)
     {
         Console.WriteLine($"Ошибка: {exc.Message}");
     }
     finally
     {
         DatabaseInteractor.Save();
     }
 }