Exemple #1
0
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try {
         if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
         {
             txtId.Text               = e.CurrentRow.Cells["Id"].Value.ToString();
             txtNombreC.Text          = e.CurrentRow.Cells["NombreCompleto"].Value.ToString();
             txtCorreo.Text           = (e.CurrentRow.Cells["Correo"].Value.ToString());
             cboDepto.SelectedValue   = int.Parse(e.CurrentRow.Cells["DEP_Id"].Value.ToString());
             cboEntidad.SelectedValue = int.Parse(e.CurrentRow.Cells["ENT_Id"].Value.ToString());
             cboPuesto.SelectedValue  = int.Parse(e.CurrentRow.Cells["PUE_Id"].Value.ToString());
             if (bool.Parse(e.CurrentRow.Cells["Proceso"].Value.ToString()) == true)
             {
                 rdbProceso.IsChecked = true;
             }
             if (bool.Parse(e.CurrentRow.Cells["Aceptado"].Value.ToString()) == true)
             {
                 rdbAceptado.IsChecked = true;
             }
             if (bool.Parse(e.CurrentRow.Cells["Rechazado"].Value.ToString()) == true)
             {
                 rdbRechazado.IsChecked = true;
             }
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Occurió un error al seleccionar el regsitro" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     oEnsamble = new WCF_Ensamble.Hersan_EnsambleClient();
     try {
         if (gvDatos.RowCount > 0)
         {
             gvDetalle.DataSource = oEnsamble.ENS_Cotizacion_ReporteDetalle(int.Parse(gvDatos.CurrentRow.Cells["Id"].Value.ToString()));
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrió un error al seleccionar el pedido\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
 private void gvDatos_CurrentRowChanged_1(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try {
         if (gvDatos.RowCount > 0)
         {
             txtId.Text         = gvDatos.Rows[e.CurrentRow.Index].Cells["Id"].Value.ToString();
             txtNombre.Text     = gvDatos.Rows[e.CurrentRow.Index].Cells["Nombre"].Value.ToString();
             txtAbrev.Text      = gvDatos.Rows[e.CurrentRow.Index].Cells["Abrev"].Value.ToString();
             chkEstatus.Checked = bool.Parse(gvDatos.Rows[e.CurrentRow.Index].Cells["Estatus"].Value.ToString());
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try {
         if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
         {
             txtId.Text = e.CurrentRow.Cells["Id"].Value.ToString();
             cboEntidad.SelectedValue = int.Parse(e.CurrentRow.Cells["ENT_Id"].Value.ToString());
             cboDepto.SelectedValue   = int.Parse(e.CurrentRow.Cells["DEP_Id"].Value.ToString());
             cboPuestos.SelectedValue = int.Parse(e.CurrentRow.Cells["PUE_Id"].Value.ToString());
             //cboPadre.SelectedValue = int.Parse(e.CurrentRow.Cells["PUE_Idjefe"].Value.ToString());
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Exemple #5
0
 private void gvPuestos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try {
         if (gvPuestos.RowCount > 0 && gvPuestos.CurrentRow.ChildRows.Count == 0)
         {
             txtIdPuesto.Text        = gvPuestos.CurrentRow.Cells["Id"].Value.ToString();
             txtIdDep.Text           = gvPuestos.CurrentRow.Cells["IdDepto"].Value.ToString();
             txtNombre.Text          = gvPuestos.CurrentRow.Cells["Nombre"].Value.ToString();
             txtAbrev.Text           = gvPuestos.CurrentRow.Cells["Abrev"].Value.ToString();
             cboDeptos.SelectedValue = int.Parse(txtIdDep.Text);
             chkEstatus.Checked      = bool.Parse(gvPuestos.CurrentRow.Cells["Estatus"].Value.ToString());
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Exemple #6
0
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try
     {
         if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
         {
             txtId.Text               = e.CurrentRow.Cells["Id"].Value.ToString();
             txtNombre.Text           = e.CurrentRow.Cells["Nombre"].Value.ToString();
             radDateTimePicker1.Value = Convert.ToDateTime(e.CurrentRow.Cells["dia"].Value.ToString());
             chkstatus.Checked        = bool.Parse(e.CurrentRow.Cells["Estatus"].Value.ToString());
         }
     }
     catch (Exception ex)
     {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Exemple #7
0
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try
     {
         if (gvDatos.RowCount > 0)
         {
             txtId.Text = e.CurrentRow.Cells["Id"].Value.ToString();
             cboEmpleados.SelectedValue = int.Parse(e.CurrentRow.Cells["Numero"].Value.ToString());
             cboHorarios.SelectedValue  = int.Parse(e.CurrentRow.Cells["IdHorarios"].Value.ToString());
             chkstatus.Checked          = bool.Parse(e.CurrentRow.Cells["Estatus"].Value.ToString());
         }
     }
     catch (Exception ex)
     {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Exemple #8
0
        private void grdCity_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
        {
            if (grdCity.CurrentRow == null)
            {
                return;
            }

            var data = grdCity.CurrentRow.DataBoundItem as vcityinfo;

            if (data == null)
            {
                return;
            }

            int id = data.id;

            Presenter.LoadCityInfo(id);
        }
Exemple #9
0
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try {
         if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
         {
             txtId.Text          = e.CurrentRow.Cells["Id"].Value.ToString();
             txtProdId.Text      = e.CurrentRow.Cells["IdProducto"].Value.ToString();
             txtCodigo.Text      = e.CurrentRow.Cells["Codigo"].Value.ToString();
             txtPrecio.Text      = e.CurrentRow.Cells["Precio"].Value.ToString();
             txtPzasVolumen.Text = e.CurrentRow.Cells["PzasVol"].Value.ToString();
             txtVolumen.Text     = e.CurrentRow.Cells["Volumen"].Value.ToString();
             txtPzasMayoreo.Text = e.CurrentRow.Cells["PzasMay"].Value.ToString();
             txtMayoreo.Text     = e.CurrentRow.Cells["Mayoreo"].Value.ToString();
             txt3A.Text          = e.CurrentRow.Cells["AAA"].Value.ToString();
             txtExWorks.Text     = e.CurrentRow.Cells["ExWorks"].Value.ToString();
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Exemple #10
0
        private void rgvUsuarios_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
        {
            try {
                Id = int.Parse(e.CurrentRow.Cells["ID"].Value.ToString());
                rtxtNombre.Text  = e.CurrentRow.Cells["Nombre"].Value.ToString();
                rtxtUsuario.Text = e.CurrentRow.Cells["Usuario"].Value.ToString();
                usr             = rtxtUsuario.Text;
                rtxtCorreo.Text = e.CurrentRow.Cells["Correo"].Value.ToString();

                var    temp        = lstUsuarios.FirstOrDefault(p => p.ID.Equals(Id));
                string Contrasenia = string.Empty;

                if (temp != null)
                {
                    Contrasenia = new EncriptadorBP().DesencriptarTexto(temp.Contrasena);
                }

                rtxtContrasenia.Text    = Contrasenia;
                rtxtRepContrasenia.Text = Contrasenia;
                rtxtRepCorreo.Text      = e.CurrentRow.Cells["Correo"].Value.ToString();
                rchkActivo.Checked      = (bool)e.CurrentRow.Cells["Activo"].Value;
                chkSuper.Checked        = (bool)e.CurrentRow.Cells["Super"].Value;

                //SE SELECCIONA EL ROL ASIGNADO AL USUARIO
                foreach (Telerik.WinControls.UI.RadTreeNode oNode in rtvPerfiles.Nodes)
                {
                    if (oNode.Name == e.CurrentRow.Cells["Rol"].Value.ToString())
                    {
                        oNode.CheckState = Telerik.WinControls.Enumerations.ToggleState.On;
                    }
                    else
                    {
                        oNode.CheckState = Telerik.WinControls.Enumerations.ToggleState.Off;
                    }
                }
            } catch (Exception ex) {
                RadMessageBox.Show("Ocurrió un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
            }
        }
 private void GvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     try {
         if (gvDatos.RowCount > 0 && e.CurrentRow.ChildRows.Count == 0)
         {
             var obj = oList.Find(item => item.Id == int.Parse(e.CurrentRow.Cells["Id"].Value.ToString()));
             txtId.Text               = obj.Id.ToString();
             txtComercial.Text        = obj.Nombre;
             txtCorreo.Text           = obj.Correo;
             txtCP.Text               = obj.Colonia.CP.ToString();
             txtDireccion.Text        = obj.Direccion;
             txtFiscal.Text           = obj.Fiscal;
             txtRFC.Text              = obj.RFC;
             txtTelefono.Text         = obj.Telefono;
             cboEstado.SelectedValue  = obj.Estado.Id;
             cboCiudad.SelectedValue  = obj.Ciudad.Id;
             cboColonia.SelectedValue = obj.Colonia.Id;
             chkEstatus.Checked       = obj.DatosUsuario.Estatus;
         }
     } catch (Exception ex) {
         RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     }
 }
Exemple #12
0
 private void gvDatos_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
 {
     //try {
     //    if (gvDatos.RowCount > 0) {
     //        var obj = oList.Find(item => item.Id == int.Parse(e.CurrentRow.Cells["Id"].Value.ToString()));
     //        txtId.Text = obj.Id.ToString();
     //        txtComercial.Text = obj.NombreComercial;
     //        txtCorreo.Text = obj.Correo;
     //        txtCP.Text = obj.Colonia.CP.ToString();
     //        txtDireccion.Text = obj.Direccion;
     //        txtExterior.Text = obj.NoExterior;
     //        txtFiscal.Text = obj.NombreFiscal;
     //        txtInterior.Text = obj.NoInterior;
     //        txtRFC.Text = obj.RFC;
     //        txtTelefono.Text = obj.Telefonos;
     //        cboCiudad.SelectedValue = obj.Ciudad.Id;
     //        cboColonia.SelectedValue = obj.Colonia.Id;
     //        cboEstado.SelectedValue = obj.Estado.Id;
     //        cboRegimen.SelectedValue = obj.RegimenFiscal.Id;
     //    }
     //} catch (Exception ex) {
     //    RadMessageBox.Show("Ocurrio un error al seleccionar el registro\n" + ex.Message, this.Text, MessageBoxButtons.OK, RadMessageIcon.Error);
     //}
 }