示例#1
0
 public void InsertarEnBaseDatosTec(cRevision rev)
 {
     if (rev.nrevision == 0)
     {
         servicio.InsertarControlRevisiones(rev.nrevision, rev.fechaI, rev.cedulaT);
     }
 }
示例#2
0
 private void txtCodigocontrol_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Enter)
     {
         rev   = rev.BuscarDispo(int.Parse(txtCodigocontrol.Text));
         dispo = dispo.BuscarDispositivo(int.Parse(txtCodigocontrol.Text));
         if ((rev.codigocontrol != 0) && (dispo.codigoControl.ToString() != null))
         {
             txtCodigocontrol.Text     = rev.codigocontrol.ToString();
             cbnomdpto.Text            = rev.Nomdpto;
             txtdiagnini.Text          = rev.Dinicial.ToString();
             cbstatus.DisplayMember    = rev.status;
             txtdiagfinal.Text         = rev.Dfinal.ToString();
             txtrecomendaciones.Text   = rev.recomendaciones;
             txtCodigocontrol.Text     = dispo.codigoControl.ToString();
             txtNomuser.Text           = dispo.usuario;
             txtCodigocontrol.ReadOnly = false;
             txtCaracteristicas.Text   = dispo.caracteristicas;
             cbTipo.Text    = dispo.tipo;
             cbnomdpto.Text = dispo.Nomdpto;
         }
         else
         {
             MessageBox.Show(" El dispositivo no existe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
     }
 }
示例#3
0
        public cRevision BuscarDispo(int codigocontrol)
        {
            cRevision rev = new cRevision();

            DataSet dsresultado = servicio.BuscarDispo(codigocontrol);


            if (dsresultado.Tables[0].Rows.Count != null)
            {
                rev.nrevision       = dsresultado.Tables[0].Rows[0]["nrevision"].ToString() != "" ? int.Parse(dsresultado.Tables[0].Rows[0]["nrevision"].ToString()) : 0;
                rev.Dfinal          = dsresultado.Tables[0].Rows[0]["Dfinal"].ToString() != "" ? dsresultado.Tables[0].Rows[0]["Dfinal"].ToString() : "";
                rev.codigocontrol   = int.Parse(dsresultado.Tables[0].Rows[0]["codigocontrol"].ToString());
                rev.coddpto         = int.Parse(dsresultado.Tables[0].Rows[0]["codigodpto"].ToString());
                rev.Nomdpto         = dsresultado.Tables[0].Rows[0]["nombre"].ToString();
                rev.Dinicial        = dsresultado.Tables[0].Rows[0]["Dinicial"].ToString();
                rev.fechaI          = dsresultado.Tables[0].Rows[0]["fecha"].ToString();
                rev.fechaF          = dsresultado.Tables[0].Rows[0]["fechasalida"].ToString() != "" ? dsresultado.Tables[0].Rows[0]["Dfinal"].ToString() : "";
                rev.recomendaciones = dsresultado.Tables[0].Rows[0]["recomendaciones"].ToString() != "" ? dsresultado.Tables[0].Rows[0]["recomendaciones"].ToString() : "";
                rev.recibe          = dsresultado.Tables[0].Rows[0]["recibe"].ToString() != "" ? dsresultado.Tables[0].Rows[0]["recibe"].ToString() : "";
                rev.status          = dsresultado.Tables[0].Rows[0]["estatus"].ToString();
                return(rev);
            }
            else
            {
                return(rev);
            }
        }
示例#4
0
        //VALIDACION DE SI LA REVISION EXISTE O NO
        public cRevision BuscarnRevision(int codigocontrol)
        {
            cRevision rev = new cRevision();

            DataSet dsresultado = servicio.BuscarnRevision(codigocontrol);

            if (dsresultado.Tables[0].Rows.Count != 0)
            {
                rev.codigocontrol = int.Parse(dsresultado.Tables[0].Rows[0]["codigocontrol"].ToString());

                return(rev);
            }
            else
            {
                return(rev);
            }
        }
示例#5
0
        public cRevision BuscarCedula(string cedula)
        {
            cRevision rev         = new cRevision();
            DataSet   dsresultado = servicio.BuscarTecnico(cedula);

            if (dsresultado.Tables[0].Rows.Count != 0)
            {
                rev.Nomdpto = dsresultado.Tables[0].Rows[0]["nombre"].ToString();


                return(rev);
            }
            else
            {
                return(rev);
            }
        }
示例#6
0
        public cRevision BuscarDpto(int coddpto)
        {
            cRevision rev         = new cRevision();
            DataSet   dsresultado = servicio.BuscarDpto(coddpto);

            if (dsresultado.Tables[0].Rows.Count != 0)
            {
                rev.Nomdpto = dsresultado.Tables[0].Rows[0]["nombre"].ToString();


                return(rev);
            }
            else
            {
                return(rev);
            }
        }
示例#7
0
        private void txtCodigocontrol_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                rev = rev.BuscarDispo(int.Parse(txtCodigocontrol.Text));
                dispo = dispo.BuscarDispositivo(int.Parse(txtCodigocontrol.Text));
                if ((rev.codigocontrol != 0)&&(dispo.codigoControl.ToString() != null))
                {

                    txtCodigocontrol.Text = rev.codigocontrol.ToString();
                    cbnomdpto.Text = rev.Nomdpto;
                    txtdiagnini.Text = rev.Dinicial.ToString();
                    cbstatus.DisplayMember = rev.status;
                    txtdiagfinal.Text = rev.Dfinal.ToString();
                    txtrecomendaciones.Text = rev.recomendaciones;
                    txtCodigocontrol.Text = dispo.codigoControl.ToString();
                    txtNomuser.Text = dispo.usuario;
                    txtCodigocontrol.ReadOnly = false;
                    txtCaracteristicas.Text = dispo.caracteristicas;
                    cbTipo.Text = dispo.tipo;
                    cbnomdpto.Text = dispo.Nomdpto;
                }
                else
                {
                    MessageBox.Show(" El dispositivo no existe", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
示例#8
0
        public static void insertar(cRevision revision)
        {
            cRevision rev = new cRevision();

            rev.InsertarEnBaseDatos(rev);
        }
示例#9
0
 public void InsertarEnBaseDatos(cRevision rev)
 {
     servicio.InsertarRevision(rev.codigocontrol, rev.coddpto, rev.Dinicial, rev.Dfinal, rev.recomendaciones, rev.status, rev.fechaI, rev.recibe, rev.fechaF);
 }
示例#10
0
 public DataSet listadRPendiente(cRevision rev)
 {
     return(servicio.ListRpendiente(rev.status));
 }
示例#11
0
 public DataSet listadRTecnico(cRevision rev)
 {
     return(servicio.ListRtecnico(rev.ci));
 }
示例#12
0
 public DataSet listadRfecha(cRevision rev)
 {
     return(servicio.ListRfecha(rev.fechaI));
 }
示例#13
0
 public void ActualizarRevision(cRevision rev)
 {
     servicio.ActualizarRevision(rev.nrevision, rev.codigocontrol, rev.coddpto, rev.Dinicial, rev.Dfinal, rev.recomendaciones, rev.status, rev.fechaI, rev.recibe, rev.fechaF);
 }