private GI.BR.Clientes.Clientes GetClientes() { GI.BR.Clientes.Clientes clientes = new GI.BR.Clientes.Clientes(); foreach (ListViewItem lvi in lvPedidos.SelectedItems) { GI.BR.Pedidos.Pedido p = (GI.BR.Pedidos.Pedido)lvi.Tag; clientes.Add(p.ClientePedido); } return clientes; }
public List<object> Buscar(GI.Framework.Seleccionador.MetodoBusqueda Metodo) { List<object> objetos = new List<object>(); GI.BR.Clientes.Clientes clientes = new GI.BR.Clientes.Clientes(); if (tipoCliente.ToString() == "GI.BR.Clientes.Propietario") { if (Metodo.NombreBusqueda == "Buscar por apellido y nombre") { clientes.RecuperarPropietarios(Metodo.ValorSeleccionado.ToString()); objetos.AddRange(clientes.ToArray()); } else if (Metodo.NombreBusqueda == "Todos los clientes") { clientes.RecuperarPropietarios(); objetos.AddRange(clientes.ToArray()); } } return objetos; }
private void bAgregarContacto_Click(object sender, EventArgs e) { Framework.frmSeleccionador frm = new GI.Framework.frmSeleccionador(new Clientes.SeleccionadorPropietarios(null)); frm.MultiSeleccion = true; if (frm.ShowDialog() == DialogResult.OK) { GI.BR.Clientes.Clientes clientes = new GI.BR.Clientes.Clientes(); foreach(GI.BR.Clientes.Cliente c in frm.ObjetosSeleccionados) { clientes.Add(c); } AgregarClientes(clientes); } }
public void Inicializar() { clientes = new GI.BR.Clientes.Clientes(); clientes.RecuperarTodos(); CargarClientes(clientes); }
private void toolStripButtonBuscar_Click(object sender, EventArgs e) { frmBuscarClientes frmBuscar = new frmBuscarClientes(); if (frmBuscar.ShowDialog() == DialogResult.OK) { this.clientes = frmBuscar.Clientes; this.CargarClientes(frmBuscar.Clientes); } }
private void bBuscar_Click(object sender, EventArgs e) { if (!checkBox1.Checked) { if (tbNombres.Text.Length < 2) { GI.Framework.General.GIMsgBox.Show("Debe al menos ingresar 2 caracteres en el campo Nombres / Apellido", GI.Framework.General.enumTipoMensaje.Advertencia); return; } } GI.Managers.Clientes.mngClientes mngClientes = new GI.Managers.Clientes.mngClientes(); if(checkBox1.Checked) this.clientes = mngClientes.RecuperarClientesTodos((GI.Managers.Clientes.enumTipoBusquedaCliente)cbTipoCliente.SelectedItem); else this.clientes = mngClientes.RecuperarClientes((GI.Managers.Clientes.enumTipoBusquedaCliente)cbTipoCliente.SelectedItem, this.tbNombres.Text); if (clientes.Count < 1) { GI.Framework.General.GIMsgBox.Show("No se han encontrado clientes coincidentes con el criterio.", GI.Framework.General.enumTipoMensaje.Advertencia); return; } this.DialogResult = DialogResult.OK; this.Close(); }
private void ofrecerToolStripMenuItem_Click(object sender, EventArgs e) { if (lvPropiedades.SelectedItems.Count > 0) { GI.BR.Propiedades.Propiedades propiedades = GetPropiedadeSeleccionadas(); GI.BR.Clientes.Clientes clientes = new GI.BR.Clientes.Clientes(); clientes.Add(this.Pedido.ClientePedido); GI.UI.Propiedades.Formularios.FrmEnviarFichasMail frm = new GI.UI.Propiedades.Formularios.FrmEnviarFichasMail(propiedades,clientes); frm.OnEnvioFinalizado += new GI.UI.Propiedades.Formularios.EnvioFinalizadoHandler(frm_OnEnvioFinalizado); frm.Show(); } }