コード例 #1
0
        private void registrosEmpleadosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            frmRegistroEmpleados nuevo = new frmRegistroEmpleados();

            nuevo.MdiParent = this;
            nuevo.Show();
        }
コード例 #2
0
        private void tbDocunmento_KeyPress(object sender, KeyPressEventArgs e)
        {
            Boolean enc = false;



            if (e.KeyChar == 13)
            {
                enc = f.existenciaEmpleado(tbDocumento.Text);
                if (enc)
                {
                    tbNombres.Text        = f.DR.ItemArray[1].ToString();
                    tbApellidos.Text      = f.DR.ItemArray[2].ToString();
                    pbxFoto.ImageLocation = Application.StartupPath + "\\Fotos\\" + f.DR.ItemArray[6].ToString();
                }
                else
                {
                    if (MessageBox.Show("Empleado no encontrado \nDesea agregarlo",
                                        "Control de Acceso", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
                    {
                        f.fb = true;
                        frmRegistroEmpleados otro = new frmRegistroEmpleados();
                        otro.MdiParent = this.MdiParent;
                        otro.Show();
                        otro.BtNuevo_Click(null, null);
                    }
                }
            }
        }