コード例 #1
0
        public static ConsumoEntity GetConsumoActual(string MAC)
        {
            ConsumoEntity entities = new ConsumoEntity();

            entities = ProviderSoftv.Cablemodem.GetConsumoActual(MAC);

            return(entities ?? new ConsumoEntity());
        }
コード例 #2
0
        public override ConsumoEntity GetConsumoActual(string MAC)
        {
            ConsumoEntity result = new ConsumoEntity();

            try
            {
                //Int32 unixTimestamp = (Int32)(DateTime.UtcNow.Subtract(new DateTime(1970, 1, 1))).TotalSeconds;
                result.Fecha = "5";// unixTimestamp.ToString();
                Random r = new Random();
                result.Rx = r.Next(0, 1000).ToString();
                result.tx = r.Next(0, 1000).ToString();
            }
            catch (Exception ex)
            {
                throw new Exception("Error GetConsumoActual " + ex.Message, ex);
            }
            return(result);
        }