Example #1
0
 private void item_cotizacion_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
 {
     try
     {
         proyectoUOne.Cotizacion    coti  = new proyectoUOne.Cotizacion();
         proyectoUOne.BuscarCliente nuevo = new proyectoUOne.BuscarCliente();
         coti.Hide();
         nuevo.ShowDialog();
         if (!String.IsNullOrEmpty(nuevo.codigoC) && !String.IsNullOrEmpty(nuevo.nitC) && !String.IsNullOrEmpty(nuevo.nombreC) &&
             !String.IsNullOrEmpty(nuevo.apellidoC) && !String.IsNullOrEmpty(nuevo.direccionC) && !String.IsNullOrEmpty(nuevo.telefonoC))
         {
             coti.txtCliente.Text  = nuevo.nombreC;
             coti.txtTelefono.Text = nuevo.telefonoC;
             coti.MdiParent        = this;
             coti.AutoSize         = true;
             coti.Show();
         }
         else
         {
             MessageBox.Show("Para cotizar necesita seleccionar un cliente");
         }
     }
     catch
     {
         MessageBox.Show("Para facturar necesita seleccionar un cliente");
     }
 }
Example #2
0
        private void item_ventas_ItemClick(object sender, DevExpress.XtraEditors.TileItemEventArgs e)
        {
            try
            {
                proyectoUOne.Factura       fac   = new proyectoUOne.Factura();
                proyectoUOne.BuscarCliente nuevo = new proyectoUOne.BuscarCliente();
                fac.Hide();
                nuevo.ShowDialog();
                if (!String.IsNullOrEmpty(nuevo.codigoC) && !String.IsNullOrEmpty(nuevo.nitC) && !String.IsNullOrEmpty(nuevo.nombreC) &&
                    !String.IsNullOrEmpty(nuevo.apellidoC) && !String.IsNullOrEmpty(nuevo.direccionC) && !String.IsNullOrEmpty(nuevo.telefonoC))
                {
                    fac.txt_temporal.Text = nuevo.codigoC;
                    fac.txt_nit.Text      = nuevo.nitC;
                    fac.txt_nombre.Text   = nuevo.nombreC;
                    fac.txt_apellido.Text = nuevo.apellidoC;

                    fac.MdiParent = this;
                    fac.AutoSize  = true;
                    fac.Show();
                }
                else
                {
                    MessageBox.Show("Para facturar necesita seleccionar un cliente");
                }
            }
            catch
            {
                MessageBox.Show("Error de llamada");
            }
        }