Exemplo n.º 1
0
        internal static ClienteCollectionBE GetClienteCollection()
        {
            ClienteCollectionBE wClienteCollectionBE = new ClienteCollectionBE();

            #region crear objetos
            ClienteBE wClienteBE = new ClienteBE();
            Random    rnd        = new Random();
            wClienteBE.IdCliente       = rnd.Next(100000);
            wClienteBE.Nombre          = "Marcelo";
            wClienteBE.Apellido        = "Oviedo";
            wClienteBE.Edad            = 32;
            wClienteBE.FechaNacimiento = System.DateTime.Now;
            wClienteCollectionBE.Add(wClienteBE);

            //wClienteBE = new ClienteBE();

            //wClienteBE.IdCliente = rnd.Next(100000);
            //wClienteBE.Nombre = "Javier";
            //wClienteBE.Apellido = "Oviedo";
            //wClienteBE.Edad = 30;
            //wClienteBE.FechaNacimiento = Convert.ToDateTime("1976-10-18T00:00:00");
            //wClienteCollectionBE.Add(wClienteBE);
            #endregion
            return(wClienteCollectionBE);
        }
Exemplo n.º 2
0
        private void viewFileButton_Click(object sender, EventArgs e)
        {
            ClienteBE wCli = new ClienteBE();

            wCli.IdCliente = 50999;
            wCli.Apellido  = "Aguirre";
            wCli.Edad      = 69;

            CacheManager.Add(wCli.IdCliente.ToString(), wCli, 10, DateFunctions.TimeMeasuresEnum.FromSeconds);
        }
Exemplo n.º 3
0
        private void btnGetFromCache_Click(object sender, EventArgs e)
        {
            ClienteBE wCli = (ClienteBE)CacheManager.GetData("TestTimeMeasuresEnum");

            if (wCli == null)
            {
                MessageBox.Show("El item TestTimeMeasuresEnum no se encuentra en cache o expiro");
            }
            else
            {
                textBox1.Text = "Item de cache: " + Environment.NewLine + wCli.GetXml();
            }
        }
Exemplo n.º 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            ClienteBE wCli = new ClienteBE();

            wCli.IdCliente = 100000000;
            wCli.Apellido  = "Marcelo oviedo";
            wCli.Edad      = 69;



            DateFunctions.TimeMeasuresEnum tm = (DateFunctions.TimeMeasuresEnum)Enum.Parse(typeof(DateFunctions.TimeMeasuresEnum), cmbTimeMessure.Text);
            CacheManager.Add("TestTimeMeasuresEnum", wCli, Convert.ToInt32(numericUpDown1.Value), tm);

            MessageBox.Show("Se agrego correctamente TestTimeMeasuresEnum ");
            textBox1.Text = wCli.GetXml();
        }