コード例 #1
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
        /* método que retorna si la cédula del tecnico ya existe en la base de datos*/
        public cTecnico BuscarTecnico(string pCedula)
        {
            cTecnico tec = new cTecnico();

            DataSet dsresultado = servicio.BuscarTecnico(pCedula);

            if (dsresultado.Tables[0].Rows.Count != 0)
            {
                tec.cedula  = dsresultado.Tables[0].Rows[0]["cedula"].ToString();
                tec.nombre  = dsresultado.Tables[0].Rows[0]["nombre"].ToString();
                tec.cargo   = dsresultado.Tables[0].Rows[0]["cargo"].ToString();
                tec.estatus = dsresultado.Tables[0].Rows[0]["estatus"].ToString();
                return(tec);
            }
            else
            {
                return(tec);
            }
        }
コード例 #2
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
        /* método que retorna si la cédula del tecnico ya existe en la base de datos*/
        public cTecnico BuscarTecnico(string pCedula)
        {
            cTecnico tec = new cTecnico();

            DataSet dsresultado = servicio.BuscarTecnico(pCedula);

            if (dsresultado.Tables[0].Rows.Count != 0)
            {

                tec.cedula = dsresultado.Tables[0].Rows[0]["cedula"].ToString();
                tec.nombre = dsresultado.Tables[0].Rows[0]["nombre"].ToString();
                tec.cargo = dsresultado.Tables[0].Rows[0]["cargo"].ToString();
                tec.estatus = dsresultado.Tables[0].Rows[0]["estatus"].ToString();
                return tec;
            }
            else
            {
                return tec;
            }
        }
コード例 #3
0
        private void txtCedula_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                tec = tec.BuscarTecnico(txtCedula.Text);


                if (tec.cedula != null)
                {
                    txtCedula.Text     = tec.cedula;
                    txtCedula.ReadOnly = Enabled;
                    txtNombre.Text     = tec.nombre;
                    txtCargo.Text      = tec.cargo;
                    cbestado.Text      = tec.estatus;
                }
                else
                {
                    MessageBox.Show("TÉCNICO NO REGISTRADO", "Búsqueda", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
コード例 #4
0
ファイル: tecnico.cs プロジェクト: Katekat/Memorandos
        private void txtCedula_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {

                tec = tec.BuscarTecnico(txtCedula.Text);

                if (tec.cedula != null)
                {
                    txtCedula.Text = tec.cedula;
                    txtCedula.ReadOnly = Enabled;
                    txtNombre.Text = tec.nombre;
                    txtCargo.Text = tec.cargo;
                    cbestado.Text = tec.estatus;

                }
                else
                {
                    MessageBox.Show("TÉCNICO NO REGISTRADO", "Búsqueda", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }

            }
        }
コード例 #5
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
 public void InsertarEnBaseDatos(cTecnico persona)
 {
     ///Metodo de inserciò0n
        servicio.InsertarTecnico(persona.cedula, persona.nombre, persona.cargo, persona.estatus);
 }
コード例 #6
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
 public void actualizarTecnico(cTecnico tec)
 {
     servicio.ActualizarTecnico(tec.cedula, tec.nombre, tec.cargo, tec.estatus);
 }
コード例 #7
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
 public static void insertar(cTecnico persona)
 {
     cTecnico tec = new cTecnico();
     tec.InsertarEnBaseDatos(persona);
 }
コード例 #8
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
 public void actualizarTecnico(cTecnico tec)
 {
     servicio.ActualizarTecnico(tec.cedula, tec.nombre, tec.cargo, tec.estatus);
 }
コード例 #9
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
        public static void insertar(cTecnico persona)
        {
            cTecnico tec = new cTecnico();

            tec.InsertarEnBaseDatos(persona);
        }
コード例 #10
0
ファイル: cTecnico.cs プロジェクト: Katekat/Memorandos
 public void InsertarEnBaseDatos(cTecnico persona)
 {
     ///Metodo de inserciò0n
     servicio.InsertarTecnico(persona.cedula, persona.nombre, persona.cargo, persona.estatus);
 }