コード例 #1
0
ファイル: ComandoSQL.cs プロジェクト: Nineales/SCE_Proyect
        public encabezadoBit obtenerBitacora(string id)
        {
            con.abrir();
            MySqlCommand query = con.getConexion().CreateCommand();

            query.CommandText = "SELECT * FROM bitacoraencabezado where idBitacoraid='" + id + "'";
            MySqlDataReader red = query.ExecuteReader();
            encabezadoBit   bit = bit = new encabezadoBit();

            while (red.Read())
            {
                bit.fecha  = (red["fecha"].ToString());
                bit.capCam = (red["capCam"].ToString());
                //txRevPap.Text = (red["revPap"].ToString());
                bit.kmInic      = (red["kmInic"].ToString());
                bit.kmFin       = (red["kmFin"].ToString());
                bit.noCaja      = (red["noCaja"].ToString());
                bit.hr          = (red["hr"].ToString());
                bit.hs          = (red["hs"].ToString());
                bit.comRuta     = (red["comRuta"].ToString());
                bit.noRem       = (red["noRem"].ToString());
                bit.nomCliente  = (red["nomCliente"].ToString());
                bit.hLlegadaCli = (red["hLlegadaCli"].ToString());
                bit.hSalCli     = (red["hSalCli"].ToString());
                bit.comClie     = (red["comCli"].ToString());
                bit.tiempoDesc  = (red["tiempoDesc"].ToString());
                bit.noRuta      = (red["noRuta"].ToString());
                bit.noCam       = (red["noCam"].ToString());
            }
            con.cerrar();
            return(bit);
        }
コード例 #2
0
        protected void gdv1_SelectedIndexChanged1(object sender, EventArgs e)
        {
            row         = gdvBit.SelectedRow;
            etNom2.Text = row.Cells[0].Text;

            gdvBit.Visible = false;


            etFechaInic.Visible = false;
            txFechaInic.Visible = false;
            etFechaFin.Visible  = false;
            txFechaFin.Visible  = false;
            btBuscar.Visible    = false;
            ddlNom.Visible      = false;
            etNom.Visible       = false;

            txFechaCon.Visible    = true;
            ddlCapCon.Visible     = true;
            ddlRevPapCon.Visible  = true;
            txNumRuta.Visible     = true;
            txNumCam.Visible      = true;
            txHS.Visible          = true;
            txNumCaja.Visible     = true;
            txHR.Visible          = true;
            txKmInic.Visible      = true;
            txKmFin.Visible       = true;
            txComRuta.Visible     = true;
            txNumRem.Visible      = true;
            txNomCli.Visible      = true;
            txHoraLlegada.Visible = true;
            txHoraSal.Visible     = true;
            txTD.Visible          = true;
            txComCli.Visible      = true;
            btModificar.Visible   = true;

            etFechaCon.Visible    = true;
            etCapCon.Visible      = true;
            etRevPapCon.Visible   = true;
            etNumRuta.Visible     = true;
            etNumCam.Visible      = true;
            etHS.Visible          = true;
            etNumCaja.Visible     = true;
            etHR.Visible          = true;
            etKmInic.Visible      = true;
            etKmFin.Visible       = true;
            etComRuta.Visible     = true;
            etNumRem.Visible      = true;
            etNomCli.Visible      = true;
            etHoraLlegada.Visible = true;
            etHoraSal.Visible     = true;
            etTD.Visible          = true;
            etComCli.Visible      = true;
            camion3.Visible       = true;
            camion.Visible        = true;
            camion2.Visible       = true;

            comm.Conectar();
            encabezadoBit bit = comm.obtenerBitacora(etNom2.Text);


            //Se hace una comparación donde se posiciona el textbox en la revisión de papeleo con el que se habia registrado
            // y se le da la opcion al supervisor de modificar ese dato
            if ((string.Compare(bit.revPap, "Mañana") == 0))
            {
                ddlRevPapCon.SelectedIndex = 1;
            }
            else if ((string.Compare(bit.revPap, "Tarde") == 0))
            {
                ddlRevPapCon.SelectedIndex = 2;
            }

            //Se hace una comparación donde se posiciona el textbox en el porcentaje con el que se habia registrado
            // y se le da la opcion al supervisor de modificar ese dato
            if (string.Compare(bit.capCam, "10%") == 0)
            {
                ddlCapCon.SelectedIndex = 1;
            }
            else if ((string.Compare(bit.capCam, "20%") == 0))
            {
                ddlCapCon.SelectedIndex = 2;
            }
            else if ((string.Compare(bit.capCam, "30%") == 0))
            {
                ddlCapCon.SelectedIndex = 3;
            }
            else if ((string.Compare(bit.capCam, "40%") == 0))
            {
                ddlCapCon.SelectedIndex = 4;
            }
            else if ((string.Compare(bit.capCam, "50%") == 0))
            {
                ddlCapCon.SelectedIndex = 5;
            }
            else if ((string.Compare(bit.capCam, "60%") == 0))
            {
                ddlCapCon.SelectedIndex = 6;
            }
            else if ((string.Compare(bit.capCam, "70%") == 0))
            {
                ddlCapCon.SelectedIndex = 7;
            }
            else if ((string.Compare(bit.capCam, "80%") == 0))
            {
                ddlCapCon.SelectedIndex = 8;
            }
            else if ((string.Compare(bit.capCam, "90%") == 0))
            {
                ddlCapCon.SelectedIndex = 9;
            }
            else if ((string.Compare(bit.capCam, "100%") == 0))
            {
                ddlCapCon.SelectedIndex = 10;
            }



            txFechaCon.Text    = bit.fecha;
            txKmInic.Text      = bit.kmInic;
            txKmFin.Text       = bit.kmFin;
            txNumCaja.Text     = bit.noCaja;
            txHR.Text          = bit.hr;
            txHS.Text          = bit.hs;
            txComRuta.Text     = bit.comRuta;
            txNumRem.Text      = bit.noRem;
            txNomCli.Text      = bit.nomCliente;
            txHoraLlegada.Text = bit.hLlegadaCli;
            txHoraSal.Text     = bit.hSalCli;
            txComCli.Text      = bit.comClie;
            txTD.Text          = bit.tiempoDesc;
            txNumRuta.Text     = bit.noRuta;
            txNumCam.Text      = bit.noCam;
        }
コード例 #3
0
        protected void btConsultar_Click(object sender, EventArgs e)
        {
            txFechaCon.Enabled = false;
            txCapCon.Enabled   = false;
            //txRevPap.Enabled = false;
            txNumRuta.Enabled     = false;
            txNumCam.Enabled      = false;
            txHS.Enabled          = false;
            txNumCaja.Enabled     = false;
            txHR.Enabled          = false;
            txKmInic.Enabled      = false;
            txKmFin.Enabled       = false;
            txComRuta.Enabled     = false;
            txNumRem.Enabled      = false;
            txNomCli.Enabled      = false;
            txHoraLlegada.Enabled = false;
            txHoraSal.Enabled     = false;
            txTD.Enabled          = false;
            txComCli.Enabled      = false;

            txFechaCon.Visible = true;
            txCapCon.Visible   = true;
            //txRevPap.Visible = true;
            txNumRuta.Visible     = true;
            txNumCam.Visible      = true;
            txHS.Visible          = true;
            txNumCaja.Visible     = true;
            txHR.Visible          = true;
            txKmInic.Visible      = true;
            txKmFin.Visible       = true;
            txComRuta.Visible     = true;
            txNumRem.Visible      = true;
            txNomCli.Visible      = true;
            txHoraLlegada.Visible = true;
            txHoraSal.Visible     = true;
            txTD.Visible          = true;
            txComCli.Visible      = true;
            btRegresar.Visible    = true;

            etFechaCon.Visible = true;
            etCapCon.Visible   = true;
            //etRevPap.Visible = true;
            etNumRuta.Visible     = true;
            etNumCam.Visible      = true;
            etHS.Visible          = true;
            etNumCaja.Visible     = true;
            etHR.Visible          = true;
            etKmInic.Visible      = true;
            etKmFin.Visible       = true;
            etComRuta.Visible     = true;
            etNumRem.Visible      = true;
            etNomCli.Visible      = true;
            etHoraLlegada.Visible = true;
            etHoraSal.Visible     = true;
            etTD.Visible          = true;
            etComCli.Visible      = true;


            comm.Conectar();
            encabezadoBit bit = comm.obtenerBitacora(etNom2.Text);

            txFechaCon.Text    = bit.fecha;
            txCapCon.Text      = bit.capCam;
            txKmInic.Text      = bit.kmInic;
            txKmFin.Text       = bit.kmFin;
            txNumCaja.Text     = bit.noCaja;
            txHR.Text          = bit.hr;
            txHS.Text          = bit.hs;
            txComRuta.Text     = bit.comRuta;
            txNumRem.Text      = bit.noRem;
            txNomCli.Text      = bit.nomCliente;
            txHoraLlegada.Text = bit.hLlegadaCli;
            txHoraSal.Text     = bit.hSalCli;
            txComCli.Text      = bit.comClie;
            txTD.Text          = bit.tiempoDesc;
            txNumRuta.Text     = bit.noRuta;
            txNumCam.Text      = bit.noCam;
        }
コード例 #4
0
        protected void gdv1_SelectedIndexChanged1(object sender, EventArgs e)
        {
            row         = gdvBit.SelectedRow;
            etNom2.Text = row.Cells[0].Text;


            txFechaCon.Enabled    = false;
            ddlCapCon.Enabled     = false;
            txNumRuta.Enabled     = false;
            txNumCam.Enabled      = false;
            txHS.Enabled          = false;
            txNumCaja.Enabled     = false;
            txHR.Enabled          = false;
            txKmInic.Enabled      = false;
            txKmFin.Enabled       = false;
            txComRuta.Enabled     = false;
            txNumRem.Enabled      = false;
            txNomCli.Enabled      = false;
            txHoraLlegada.Enabled = false;
            txHoraSal.Enabled     = false;
            txTD.Enabled          = false;
            txComCli.Enabled      = false;
            txNumRem.Enabled      = false;
            ddlRevPapCon.Enabled  = false;

            txFechaCon.Visible    = true;
            ddlCapCon.Visible     = true;
            ddlRevPapCon.Visible  = true;
            txNumRuta.Visible     = true;
            txNumCam.Visible      = true;
            txHS.Visible          = true;
            txNumCaja.Visible     = true;
            txHR.Visible          = true;
            txKmInic.Visible      = true;
            txKmFin.Visible       = true;
            txComRuta.Visible     = true;
            txNumRem.Visible      = true;
            txNomCli.Visible      = true;
            txHoraLlegada.Visible = true;
            txHoraSal.Visible     = true;
            txTD.Visible          = true;
            txComCli.Visible      = true;


            etFechaCon.Visible    = true;
            etCapCon.Visible      = true;
            etRevPapCon.Visible   = true;
            etNumRuta.Visible     = true;
            etNumCam.Visible      = true;
            etHS.Visible          = true;
            etNumCaja.Visible     = false;
            etHR.Visible          = true;
            etKmInic.Visible      = true;
            etKmFin.Visible       = true;
            etComRuta.Visible     = true;
            etNumRem.Visible      = true;
            etNumCaja.Visible     = true;
            etNomCli.Visible      = true;
            etHoraLlegada.Visible = true;
            etHoraSal.Visible     = true;
            etTD.Visible          = true;
            etComCli.Visible      = true;
            camion.Visible        = true;
            camion2.Visible       = true;
            camion3.Visible       = true;
            etMin.Visible         = true;


            comm.Conectar();
            encabezadoBit bit = comm.obtenerBitacora(etNom2.Text);

            ddlRevPapCon.Text  = bit.revPap;
            txFechaCon.Text    = bit.fecha;
            ddlCapCon.Text     = bit.capCam;
            txKmInic.Text      = bit.kmInic;
            txKmFin.Text       = bit.kmFin;
            txNumCaja.Text     = bit.noCaja;
            txHR.Text          = bit.hr;
            txHS.Text          = bit.hs;
            txComRuta.Text     = bit.comRuta;
            txNumRem.Text      = bit.noRem;
            txNomCli.Text      = bit.nomCliente;
            txHoraLlegada.Text = bit.hLlegadaCli;
            txHoraSal.Text     = bit.hSalCli;
            txComCli.Text      = bit.comClie;
            txTD.Text          = bit.tiempoDesc;
            txNumRuta.Text     = bit.noRuta;
            txNumCam.Text      = bit.noCam;
        }