private void _Dg_Grid_CellClick(object sender, DataGridViewCellEventArgs e)
 {
     _Er_Error.Dispose();
     if (e.RowIndex != -1)
     {
         if (e.ColumnIndex == 4)
         {
             string _Str_Relacion     = Convert.ToString(_Dg_Grid.Rows[_Dg_Grid.CurrentCell.RowIndex].Cells[0].Value);
             string _Str_PreRelacion  = Convert.ToString(_Dg_Grid.Rows[_Dg_Grid.CurrentCell.RowIndex].Cells[1].Value);
             string _Str_TipoRelacion = Convert.ToString(_Dg_Grid.Rows[_Dg_Grid.CurrentCell.RowIndex].Cells[3].Value);
             if (_Str_TipoRelacion == "COBRO CAMIÓN")
             {
                 Cursor = Cursors.WaitCursor;
                 Frm_ReporteRelacionCobro _Frm_Form = new Frm_ReporteRelacionCobro(Frm_Padre._Str_GroupComp, Frm_Padre._Str_Comp, "0", _Str_Relacion, false);
                 _Frm_Form.ShowDialog();
                 Cursor = Cursors.Default;
             }
             else
             {
                 if (_Str_PreRelacion.Trim().Length == 0)
                 {
                     _Str_PreRelacion = _Str_Relacion;
                 }
                 string _Str_Url = CLASES._Cls_Conexion._G_Str_Url_RelacionesCobranzaLocal.Replace("mrelacionaprob.aspx", "Resumen_Relacion.aspx") + "?crelacion=" + _Str_PreRelacion + "&compania=" + Frm_Padre._Str_Comp.Trim();
                 var    _Frm     = new Frm_Navegador(_Str_Url, true, true)
                 {
                     Dock = DockStyle.Fill, Width = Width, Height = (Height + 50)
                 };
                 _Frm.ShowDialog();
             }
         }
     }
 }
Exemple #2
0
 private void _Bt_Rif_Click(object sender, EventArgs e)
 {
     try
     {
         string        _Str_Rif = _Cmb_Rif1.SelectedItem.ToString().Trim() + "-" + _Txt_Rif2.Text.Trim() + "-" + _Txt_Rif3.Text.Trim();
         string        _Str_Url = CLASES._Cls_Varios_Metodos._Str_Servidor_Web + "/este.aspx?este=" + _Str_Rif.Replace("-", "");
         Frm_Navegador _Frm     = new Frm_Navegador(_Str_Url, false);
         _Frm.MdiParent = this.MdiParent;
         _Frm.Dock      = DockStyle.Fill;
         _Frm.Show();
     }
     catch { }
 }
Exemple #3
0
 private void _Dg_Datagrid_RowHeaderMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     if (_Dg_Datagrid.SelectedRows.Count > 0)
     {
         if (!_Bol_Boleano)
         {
             try
             {
                 _Str_FrmResultado = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[_Int_Pos1].Value.ToString();
                 _Txt_Codigo.Text  = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[_Int_Pos1].Value.ToString(); _Txt_Descri.Text = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[_Int_Pos2].Value.ToString(); this.Close();
             }
             catch { }
         }
         if (_Bol_Navegador)
         {
             try
             {
                 _Str_Cadena_Navegador2 = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString();
                 string        _Str_Cadena = _Str_Cadena_Navegador1 + osio.encriptar(_Str_Cadena_Navegador2) + _Str_Cadena_Navegador3;
                 Frm_Navegador _Frm        = new Frm_Navegador(_Str_Cadena, false);
                 _Frm.MdiParent = this.MdiParent;
                 _Frm.Dock      = DockStyle.Fill;
                 _Frm.Show();
             }
             catch { }
         }
         if (_Bol_UnTextbox)
         {
             try
             {
                 _Str_FrmResultado = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString();
                 _Txt_Codigo.Text  = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString(); this.Close();
             }
             catch { }
         }
         if (_Form != "")
         {
             Form _Frm = (Form)Activator.CreateInstance(Type.GetType(_Form), new object[] { _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString() });
             _Frm.Show();
             _Frm.MdiParent = this.MdiParent;
             this.Close();
         }
         //PARA QUE DEVUELVA EL VALOR COMO MODAL
         if (_Int_FrmModalAux != 0)
         {
             try
             { _Str_FrmResultado = _Dg_Datagrid.Rows[_Dg_Datagrid.CurrentCell.RowIndex].Cells[0].Value.ToString(); this.Close(); }
             catch { }
         }
     }
 }
Exemple #4
0
        private void _Dg_Grid_Descargadas_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if ((e.ColumnIndex < 0) || (e.RowIndex < 0))
            {
                return;
            }
            if (_Dg_Grid_Descargadas.Columns[e.ColumnIndex].Name == "_Btn_Verificar_Descargadas")
            {
                //Obtenemos los datos
                var _Int_cidrelacobro = Convert.ToInt32(_Dg_Grid_Descargadas.Rows[e.RowIndex].Cells["Nº Pre-Relación"].Value);
                var _Str_ccompany     = _Dg_Grid_Descargadas.Rows[e.RowIndex].Cells["ccompany"].Value.ToString();

                //Verificamos si la caja esta cerrando
                var _Bol_CierreCajaActivado = _Mtd_SeEstaCerrandoCaja(_Str_ccompany);

                //Tomamos el valor
                if (_Bol_CierreCajaActivado)
                {
                    MessageBox.Show("Se esta cerrando caja en otro equipo.\nNo es posible aprobar relaciones en estos momentos.", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                //Verificamos si la relacion esta correcta (fue descargada completa)
                if (_Mtd_RelacionDescargadaCorrectamente(Frm_Padre._Str_GroupComp, _Str_ccompany, _Int_cidrelacobro))
                {
                    //Verificamos si la relación ya fue aprobada
                    if (_Mtd_RelacionYaFueAprobada(Frm_Padre._Str_GroupComp, _Str_ccompany, _Int_cidrelacobro))
                    {
                        MessageBox.Show("La relación de cobranza ya fué aprobada.", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        string _Str_Url = CLASES._Cls_Conexion._G_Str_Url_RelacionesCobranzaLocal + "?IdRelacion=" + _Int_cidrelacobro + "&compania=" + _Str_ccompany + "&usuario=" + Frm_Padre._Str_Use.Trim();
                        var    _Frm     = new Frm_Navegador(_Str_Url, true, true)
                        {
                            Dock = DockStyle.Fill, Width = Width, Height = (Height + 50)
                        };
                        _Frm.ShowDialog();
                    }
                }
                else
                {
                    MessageBox.Show("La relación de cobranza se está descargando por favor intenten nuevamente en unos minutos..", "Información", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                _Mtd_Actualizar_Descargadas();
                _Mtd_VerificarSiHayQueCerrarFormulario();
                _Mtd_ActualizaNotificadores();
            }
        }
Exemple #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            bool    _Bol_TransInt = false;
            string  _Str_Rif      = "";
            string  _Str_Sql      = "SELECT cintext FROM TTRANSPORTE WHERE cplaca='" + _Str_FrmPlaca + "'";
            DataSet _Ds           = Program._MyClsCnn._mtd_conexion._Mtd_RetornarDataset(_Str_Sql);

            if (_Ds.Tables[0].Rows.Count > 0)
            {
                if (_Ds.Tables[0].Rows[0][0].ToString() == "1")
                {
                    _Bol_TransInt = true;
                }
                else
                {
                    _Bol_TransInt = false;
                }
            }
            if (_Bol_TransInt)
            {
                if (_Cmb_Rif.SelectedIndex != -1 & _Txt_Rif1.Text.Trim().Length == 8)
                {
                    if (_Txt_Rif2.Text.Trim().Length > 0)
                    {
                        _Str_Rif = _Cmb_Rif.SelectedItem.ToString() + "-" + _Txt_Rif1.Text.Trim() + "-" + _Txt_Rif2.Text.Trim();
                    }
                    else
                    {
                        _Str_Rif = _Cmb_Rif.SelectedItem.ToString() + "-" + _Txt_Rif1.Text.Trim();
                    }
                }
                else
                {
                    _Str_Rif = "";
                }
            }
            else
            {
                if (_Cmb_Rif.SelectedIndex != -1 & _Txt_Rif1.Text.Trim().Length == 8 & _Txt_Rif2.Text.Trim().Length > 0)
                {
                    _Str_Rif = _Cmb_Rif.SelectedItem.ToString() + "-" + _Txt_Rif1.Text.Trim() + "-" + _Txt_Rif2.Text.Trim();
                }
                else
                {
                    _Str_Rif = "";
                }
            }

            if (_Str_Rif.Trim().Length > 0)
            {
                string        _Str_Url = CLASES._Cls_Varios_Metodos._Str_Servidor_Web + "/este.aspx?este=" + _Str_Rif.Replace("-", "");
                Frm_Navegador _Frm     = new Frm_Navegador(_Str_Url, false);
                _Frm.MdiParent = this.MdiParent;
                _Frm.Dock      = DockStyle.Fill;
                _Frm.Show();
            }
            else
            {
                MessageBox.Show("El rif que introdujo no es válido", "Requerimiento", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }