private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmCliente frmC = frmCliente.GetInstancia();

            //  frmP.MdiParent = this;
            frmC.Show();
        }
Ejemplo n.º 2
0
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmCliente frm = new frmCliente();

            frm.MdiParent = this;
            frm.Show();
        }
Ejemplo n.º 3
0
        private void mnuClientes_Click(object sender, EventArgs e)
        {
            frmCliente frm = frmCliente.GetInstancia();

            frm.MdiParent = this;
            frm.Show();
        }
Ejemplo n.º 4
0
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmCliente cliente = new frmCliente(id_usuario, nombre, cargo);

            cliente.MdiParent = this;
            cliente.Show();
        }
Ejemplo n.º 5
0
        private void btnInsertarDuenno_Click(object sender, EventArgs e)
        {
            frmCliente frm_cliente = new frmCliente(id_usuario, usuario, cargo);

            frm_cliente.Show();
            this.SetVisibleCore(false);
        }
Ejemplo n.º 6
0
        //--->OPCION MENU :  Clientes
        private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmCliente frm = new frmCliente();

            frm.MdiParent = this;     //->Indicado como formulario Padre
            frm.Show();
        }
Ejemplo n.º 7
0
        private void btnCliente_Click(object sender, EventArgs e)
        {
            frmCliente frm = new frmCliente();

            frm.MdiParent = this;
            frm.Show();
        }
Ejemplo n.º 8
0
        private void btnCliente_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmCliente frmCliente = new frmCliente();

            frmCliente.Show();
        }
Ejemplo n.º 9
0
        private void mnuCliente_Click(object sender, EventArgs e)
        {
            frmCliente form = new frmCliente();

            form.MdiParent = this;

            form.Show();
            form.dataListado.ClearSelection();
        }
Ejemplo n.º 10
0
 private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         frmCliente frmCliente = new frmCliente(u.Id_Usuario);
         frmCliente.MdiParent = this;
         foreach (Form frm in Application.OpenForms)
         {
             if (frm is frmCliente)
             {
                 frm.Show();
                 frm.Size        = MinimumSize;
                 frm.WindowState = FormWindowState.Normal;
                 return;
             }
         }
         frmCliente.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Aviso",
                         MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 private void clientesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     frmCliente frm = new frmCliente();
     frm.MdiParent = this;
     frm.Show();
 }
        private void btnAgregarCliente_Click(object sender, EventArgs e)
        {
            frmCliente frmVC = frmCliente.GetInstancia();

            frmVC.Show();
        }
Ejemplo n.º 13
0
        private void dgvCliente_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            string sexo = "";

            if (e.RowIndex != -1)
            {
                if (dgvCliente.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals("Editar"))
                {
                    int idCliente = Convert.ToInt32(dgvCliente.Rows[e.RowIndex].Cells[1].Value.ToString());


                    frmCliente frmCliente = new frmCliente();
                    frmCliente.Show();

                    var tabla = NCliente.BuscarClienteId(idCliente);

                    frmCliente.MiFormCliente.txtNombres.Text   = tabla.Rows[0]["nombres"].ToString();
                    frmCliente.MiFormCliente.txtApellidos.Text = tabla.Rows[0]["apellidos"].ToString();
                    frmCliente.MiFormCliente.txtDni.Text       = tabla.Rows[0]["dni"].ToString();
                    sexo = tabla.Rows[0]["sexo"].ToString();
                    if (sexo == "M")
                    {
                        frmCliente.MiFormCliente.cboSexo.SelectedItem = "Masculino";
                    }
                    else
                    {
                        frmCliente.MiFormCliente.cboSexo.SelectedItem = "Femenino";
                    }
                    frmCliente.MiFormCliente.txtTelefono.Text  = tabla.Rows[0]["telefono"].ToString();
                    frmCliente.MiFormCliente.txtCorreo.Text    = tabla.Rows[0]["correo"].ToString();
                    frmCliente.MiFormCliente.txtDireccion.Text = tabla.Rows[0]["direccion"].ToString();
                    byte[] img = (byte[])tabla.Rows[0]["foto"];
                    var    ms  = new MemoryStream(img);
                    frmCliente.MiFormCliente.pbFoto.Image = Image.FromStream(ms);

                    frmCliente.MiFormCliente.idCliente = idCliente;
                    frmCliente.MiFormCliente._IsNew    = false;
                }
                if (dgvCliente.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals("Eliminar"))
                {
                    int          idclient = Convert.ToInt32(dgvCliente.Rows[e.RowIndex].Cells[1].Value.ToString());
                    DialogResult rspta    = MessageBox.Show("Desea Eliminar", "Message", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation);
                    if (DialogResult.Yes == rspta)
                    {
                        var rpta = NCliente.EliminarCliente(idclient);

                        if (rpta == "Ok")
                        {
                            MessageBox.Show(rpta + "---Elimado");
                            dgvCliente.Rows.RemoveAt(e.RowIndex);
                            NCliente objCliente = new NCliente();
                            objCliente.ListadoDgv(dgvCliente);
                            dgvCliente.Refresh();
                        }
                        else
                        {
                            MessageBox.Show("error");
                        }
                    }
                }
                if (dgvCliente.Rows[e.RowIndex].Cells[e.ColumnIndex].Value.ToString().Equals("Ver"))
                {
                    int idCliente = Convert.ToInt32(dgvCliente.Rows[e.RowIndex].Cells[1].Value.ToString());

                    frmPerfil perfil = new frmPerfil();
                    perfil.Show();

                    var tabla = NCliente.BuscarClienteId(idCliente);

                    if (tabla.Rows.Count > 0)
                    {
                        sexo = tabla.Rows[0]["sexo"].ToString();
                        if (sexo == "M")
                        {
                            sexo = "Masculino";
                        }
                        else
                        {
                            sexo = "Femenino";
                        }

                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Nombre:     " + tabla.Rows[0]["nombres"].ToString());
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("");
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Apellidos:  " + tabla.Rows[0]["apellidos"].ToString());
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("");
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Dni:        " + tabla.Rows[0]["dni"].ToString());
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("");
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Sexo:       " + sexo);
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("");
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Teléfono:   " + tabla.Rows[0]["telefono"].ToString());
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("");
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Correo:     " + tabla.Rows[0]["correo"].ToString());
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("");
                        frmPerfil.MiFormPerfil.listDatos.Items.Add("Dirección:  " + tabla.Rows[0]["direccion"].ToString());

                        byte[] img = (byte[])tabla.Rows[0]["foto"];
                        var    ms  = new MemoryStream(img);
                        frmPerfil.MiFormPerfil.pbFoto.Image   = Image.FromStream(ms);
                        frmPerfil.MiFormPerfil.lblTitulo.Text = "Datos Cliente";
                    }
                }
            }
        }