コード例 #1
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();
            }
        }
コード例 #2
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();
        }