private void btnElegirCliente_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarCliente ElegirProducto = new frmSeleccionarCliente();
         ElegirProducto.Location = this.txtCliente.PointToScreen(new Point());
         ElegirProducto.Location = new Point(ElegirProducto.Location.X - 1, ElegirProducto.Location.Y - 2);
         ElegirProducto.ShowDialog();
         ElegirProducto.Dispose();
         if (ElegirProducto.DialogResult == DialogResult.OK)
         {
             Cliente Aux = ElegirProducto.Datos;
             this.CatalogoActual  = Aux;
             this.txtCliente.Text = Aux.Nombre;
             this.txtNombreNotificacion.Focus();
         }
         else
         {
             this.CatalogoActual  = new Cliente();
             this.txtCliente.Text = string.Empty;
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmNuevaNotificacion ~ btnElegirCliente_Click");
     }
 }
Пример #2
0
 private void btnElegirCliente_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarCliente ElegirCliente = new frmSeleccionarCliente();
         ElegirCliente.Location = this.txtCliente.PointToScreen(new Point());
         ElegirCliente.Location = new Point(ElegirCliente.Location.X - 1, ElegirCliente.Location.Y - 2);
         ElegirCliente.ShowDialog();
         ElegirCliente.Dispose();
         if (ElegirCliente.DialogResult == DialogResult.OK)
         {
             Cliente Aux = ElegirCliente.Datos;
             this._ClienteSeleccionado = new Cliente {
                 IDCliente = Aux.IDCliente, Nombre = Aux.Nombre
             };
             this.btnGuardar.Focus();
         }
         else
         {
             this.ClienteSeleccionado = new Cliente {
                 IDCliente = string.Empty, Nombre = string.Empty
             };
         }
         this.txtCliente.Text = this.ClienteSeleccionado.Nombre;
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmElegirServicioCita ~ btnElegirCliente_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Пример #3
0
 private void btnElegirCliente_Click(object sender, EventArgs e)
 {
     try
     {
         frmSeleccionarCliente ElegirCliente = new frmSeleccionarCliente();
         ElegirCliente.Location = this.txtClientes.PointToScreen(new Point());
         ElegirCliente.Location = new Point(ElegirCliente.Location.X - 1, ElegirCliente.Location.Y - 2);
         ElegirCliente.ShowDialog();
         ElegirCliente.Dispose();
         if (ElegirCliente.DialogResult == DialogResult.OK)
         {
             this.AsignarCliente   = ElegirCliente.Datos;
             this.txtClientes.Text = this.AsignarCliente.Nombre;
             this.btnGuardarCliente.Focus();
         }
     }
     catch (Exception ex)
     {
         LogError.AddExcFileTxt(ex, "frmValesXClientes ~ btnElegirCliente_Click");
         MessageBox.Show(Comun.MensajeError, Comun.Sistema, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }