private void Buscar_Conductor()
        {
            ENResultOperation R = ClsTransportista_ChoferBC.Listar_Filtro(txtConductor.Text, nTran_Ide);

            if (R.Proceder)
            {
                DataTable dt = (DataTable)R.Valor;
                if (dt.Rows.Count == 1)
                {
                    DataRow ROW = dt.Rows[0];
                    txtConductor.Text = ROW["TRAN_CHOF_NOMBRE"].ToString();
                    txtChof_Ide.Text  = ROW["TRAN_CHOF_IDE"].ToString();
                    Conductor         = Convert.ToInt32(txtChof_Ide.Text);
                }
                else
                {
                    Transportista.frmTransportista_Chofer_Buscar frmChoferes_Buscar = new Transportista.frmTransportista_Chofer_Buscar();
                    frmChoferes_Buscar.Transportista_Ide    = 2564;
                    frmChoferes_Buscar.Transportista_Nombre = "TERAH S.A.C";
                    frmChoferes_Buscar.Chofer_Nombre        = txtConductor.Text;
                    frmChoferes_Buscar.ShowDialog();
                    txtChof_Ide.Text  = frmChoferes_Buscar.Chofer_Ide;
                    Conductor         = Convert.ToInt32(frmChoferes_Buscar.Chofer_Ide);
                    txtConductor.Text = frmChoferes_Buscar.Chofer_Nombre;
                }
            }
        }
Esempio n. 2
0
        public void Cargar_Choferes()
        {
            DataTable         TEMP   = new DataTable();
            string            filtro = txtBuscar.Text;
            ENResultOperation R      = ClsTransportista_ChoferBC.Listar_Filtro(filtro, Transportista_Ide);

            if (R.Proceder)
            {
                dgvListado.DataSource = (DataTable)R.Valor;
            }
        }
        private void Buscar_Chofer()
        {
            ENResultOperation R = ClsTransportista_ChoferBC.Listar_Filtro(txtChofer.Text, nTran_Ide);

            if (R.Proceder)
            {
                DataTable dt = (DataTable)R.Valor;
                if (dt.Rows.Count == 1)
                {
                    DataRow ROW = dt.Rows[0];
                    txtChofer.Text = ROW["TRAN_CHOF_NOMBRE"].ToString();
                    nTran_Chof_Ide = Convert.ToInt32(ROW["TRAN_CHOF_IDE"]);
                }
                else
                {
                    Transportista.frmTransportista_Chofer_Buscar frmBuscarChof = new Transportista.frmTransportista_Chofer_Buscar();
                    frmBuscarChof.Transportista_Ide    = nTran_Ide;
                    frmBuscarChof.Transportista_Nombre = txtChofer.Text;
                    frmBuscarChof.ShowDialog();
                    txtChofer.Text = frmBuscarChof.Transportista_Nombre;
                    nTran_Chof_Ide = Convert.ToInt32(frmBuscarChof.Chofer_Ide);
                }
            }
        }