public void SendValue(string gatewayId, double value, DateTime gatewayTime)
        {
            //Update the database table with the new value
            IDemResCallback callback = OperationContext.Current.GetCallbackChannel <IDemResCallback>();

            //Get the value from the database and curtail if total price
            callback.Curtail(1);
        }
        public void SendValue(string gatewayId, double kWhValue, DateTime gatewayTime)
        {
            //Update the database table with the new value
            InsertEnergyMeterValues(gatewayId, kWhValue, gatewayTime);
            //Get the value from the database and curtail if total price > $1.0
            double cost = GetCostByGateway(gatewayId, kWhValue);

            //if (cost > 1.0)
            //{
            IDemResCallback callback = OperationContext.Current.GetCallbackChannel <IDemResCallback>();

            callback.Curtail(70);
            //}
        }