public static ClienteCollectionBE SearchCleintes() { ClienteCollectionBE list = new ClienteCollectionBE(); ClienteBE client = new ClienteBE(); client.EntityState = EntityState.Changed; client.IdCliente = 100; client.Nombre = "Catalina F "; client.Apellido = "Oviedo"; client.Edad = 23; client.FechaNacimiento = Convert.ToDateTime("2006-10-18T00:00:00"); //new DateTime(2006,12,18); list.Add(client); client = new ClienteBE(); client.EntityState = EntityState.Changed; client.IdCliente = 101; client.Nombre = "Cleant"; client.Apellido = "Socrates"; client.Edad = 32; client.FechaNacimiento = new DateTime(1998, 12, 18); list.Add(client); client = new ClienteBE(); client.EntityState = EntityState.Changed; client.IdCliente = 102; client.Nombre = "Ramon"; client.Apellido = "sosa"; client.Edad = 32; client.FechaNacimiento = new DateTime(1998, 12, 18); list.Add(client); return(list); }
private void intObjects() { #region crear objetos _ClienteCollectionBE = new ClienteCollectionBE(); ClienteBE wCli = new ClienteBE(); wCli.Nombre = "Marcelo"; wCli.Apellido = "Oviedo"; wCli.Edad = 32; wCli.FechaNacimiento = Convert.ToDateTime("1974-10-18T00:00:00"); wCli.Direccion.Altura = 9000; wCli.Direccion.Calle = "Ilia y chacabuco"; #endregion _ClienteCollectionBE.Add(wCli); bindingSource1.DataSource = _ClienteCollectionBE[0]; bindingSource1.CurrentChanged += new EventHandler(bindingSource1_CurrentChanged); bindingSource1.CurrentItemChanged += new EventHandler(bindingSource1_CurrentItemChanged); #region crear objetos _ClienteCollectionBE_2 = new ClienteCollectionBE_2(); ClienteBE_2 wCli_2 = new ClienteBE_2(); wCli_2.Nombre = "Marcelo"; wCli_2.Apellido = "Oviedo"; wCli_2.Edad = 32; wCli_2.FechaNacimiento = Convert.ToDateTime("1974-10-18T00:00:00"); #endregion _ClienteCollectionBE.Add(wCli); _ClienteCollectionBE[0].SetHistory(); }
private void button1_Click_1(object sender, EventArgs e) { ClienteCollectionBE wClienteCollectionBE = new ClienteCollectionBE(); #region crear objetos ClienteBE wClienteBE1 = new ClienteBE(); wClienteBE1.Nombre = "Marcelo"; wClienteBE1.Apellido = "Oviedo"; wClienteBE1.Edad = 32; wClienteBE1.FechaNacimiento = Convert.ToDateTime("1974-10-18T00:00:00"); ClienteBE wClienteBE2 = new ClienteBE(); wClienteBE2.Nombre = "Javier"; wClienteBE2.Apellido = "Oviedo"; wClienteBE2.Edad = 30; wClienteBE2.FechaNacimiento = Convert.ToDateTime("1976-10-18T00:00:00"); wClienteCollectionBE.Add(wClienteBE1); wClienteCollectionBE.Add(wClienteBE2); #endregion label2.Text = "wClienteBE1.GetDataSet().GetXml()"; txtEntidadSimple.Text = wClienteBE1.GetDataSet().GetXml(); DataSet wDtsClienteCollection = wClienteCollectionBE.GetDataSet(); label1.Text = "wDtsClienteCollection.GetXml()"; txtCollection.Text = wDtsClienteCollection.GetXml(); dataGridView1.DataSource = wDtsClienteCollection.Tables[0]; }
private void button1_Click(object sender, EventArgs e) { m_ClienteCollectionBE = new ClienteCollectionBE(); ClienteBE wClienteBE1 = new ClienteBE(); wClienteBE1.EntityState = EntityState.Changed; wClienteBE1.Nombre = "Marcelo F Oviedo"; wClienteBE1.Apellido = "Pelsoft"; wClienteBE1.Edad = 32; wClienteBE1.Historial = new Xml.CData(); wClienteBE1.Historial.Text = @"<Contrato Nro 21>"; wClienteBE1.FechaNacimiento = Convert.ToDateTime("2006-10-18T00:00:00"); //new DateTime(2006,12,18); m_ClienteCollectionBE.Add(wClienteBE1); string ss = m_ClienteCollectionBE.ToString(); label2.Text = "Xml de ClienteBE1"; txtEntidadSimple.Text = wClienteBE1.GetXml(); try { label1.Text = "Xml de ClienteCollectionBE"; txtCollection.Text = m_ClienteCollectionBE.GetXml(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void btnZipObject_Click(object sender, EventArgs e) { ClienteBE wClienteBE = new ClienteBE(); wClienteBE.Apellido = "Lopez"; wClienteBE.Nombre = "Jenifer"; wClienteBE.Edad = 3; textBox1.Text = FwkCompression.Zip_Object(wClienteBE); }
private void button7_Click(object sender, EventArgs e) { try { ClienteBE wClienteBE = (ClienteBE)FwkCompression.UnzipZip_From_base64_object(textBox1.Text); textBox2.Text = wClienteBE.GetXml(); } catch (System.FormatException) { MessageBox.Show("El origen debe ser en un string en b64 producto de haber utilizado la funcion FwkCompression.UnzipZip_From_base64(origen);"); } }
private void button11_Click(object sender, EventArgs e) { ClienteBE c = m_ClienteCollectionBE.Where(p => p.Apellido.Equals("pelsoft")).FirstOrDefault(); }