Exemplo n.º 1
0
 private void GrdDetalle_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
 {
     if (e.CommandName == "CmdEditar")
     {
         DataSet dsClinica = ClClinica.Get_Clinca(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["ClinicaId"]));
         TxtClinicaId.Text         = dsClinica.Tables["Datos"].Rows[0]["ClinicaId"].ToString();
         TxtNombre.Value           = dsClinica.Tables["Datos"].Rows[0]["Nombre"].ToString();
         TxtDireccion.Value        = dsClinica.Tables["Datos"].Rows[0]["Direccion"].ToString();
         CboPais.SelectedValue     = dsClinica.Tables["Datos"].Rows[0]["PaisId"].ToString();
         CboPais.SelectedItem.Text = dsClinica.Tables["Datos"].Rows[0]["Pais"].ToString();
         CboDepartamento.ClearSelection();
         CboMunicipio.ClearSelection();
         CboDepartamento.Items.Clear();
         CboMunicipio.Items.Clear();
         ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Departamento(Session["Idioma"].ToString(), Convert.ToInt32(CboPais.SelectedValue)), CboDepartamento, "Id", "Datos");
         ClUtilitarios.AgregarSeleccioneCombo(CboDepartamento, ClTraductor.BuscaString(Session["Idioma"].ToString(), "49"), Session["Idioma"].ToString());
         CboDepartamento.SelectedValue     = dsClinica.Tables["Datos"].Rows[0]["DepartamentoId"].ToString();
         CboDepartamento.SelectedItem.Text = dsClinica.Tables["Datos"].Rows[0]["Departamento"].ToString();
         CboMunicipio.ClearSelection();
         CboMunicipio.Items.Clear();
         ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Municipio(Session["Idioma"].ToString(), Convert.ToInt32(CboDepartamento.SelectedValue)), CboMunicipio, "Id", "Datos");
         ClUtilitarios.AgregarSeleccioneCombo(CboMunicipio, ClTraductor.BuscaString(Session["Idioma"].ToString(), "50"), Session["Idioma"].ToString());
         CboMunicipio.SelectedValue     = dsClinica.Tables["Datos"].Rows[0]["MunicipioId"].ToString();
         CboMunicipio.SelectedItem.Text = dsClinica.Tables["Datos"].Rows[0]["Municipio"].ToString();
         TxtTelCasa.Value = dsClinica.Tables["Datos"].Rows[0]["Telefono"].ToString();
         dsClinica.Clear();
         BtnGrabar.Visible = true;
     }
 }
Exemplo n.º 2
0
        protected void FillCboMunicipio()
        {
            CMunicipio objMunicipio = new CMunicipio(_DataSistema.ConexionBaseDato);

            dvMunicipio = new DataView(objMunicipio.Detalle(0, Convert.ToInt32(CboDepartamento.SelectedValue), "", DateTime.Now, "", DateTime.Now, 2).TBC_MUNICIPIO);

            CboMunicipio.DataSource = dvMunicipio;
            CboMunicipio.DataBind();
        }
Exemplo n.º 3
0
 void Limpiar()
 {
     TxtNombre.Value    = "";
     TxtDireccion.Value = "";
     CboMunicipio.ClearSelection();
     CboDepartamento.ClearSelection();
     CboPais.ClearSelection();
     TxtTelCasa.Value  = "";
     TxtClinicaId.Text = "";
 }
Exemplo n.º 4
0
        private void GrdDetalle_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "CmdEditar")
            {
                DataSet dsUsuario = ClUsuario.GetDatosUsuarioId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UsuarioId"].ToString()), Session["Idioma"].ToString());
                TxtUsuarioId.Text           = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UsuarioId"].ToString();
                CboAlias.SelectedValue      = dsUsuario.Tables["Datos"].Rows[0]["AliasIid"].ToString();
                CboAlias.SelectedItem.Text  = dsUsuario.Tables["Datos"].Rows[0]["aliasper"].ToString();
                TxtNombres.Value            = dsUsuario.Tables["Datos"].Rows[0]["Nombres"].ToString();
                TxtApellidos.Value          = dsUsuario.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                CboGenero.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["GeneroId"].ToString();
                CboGenero.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["generoper"].ToString();
                CboPais.SelectedValue       = dsUsuario.Tables["Datos"].Rows[0]["PaisId"].ToString();
                CboPais.SelectedItem.Text   = dsUsuario.Tables["Datos"].Rows[0]["paisper"].ToString();
                CboDepartamento.ClearSelection();
                CboMunicipio.ClearSelection();
                CboDepartamento.Items.Clear();
                CboMunicipio.Items.Clear();
                ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Departamento(Session["Idioma"].ToString(), Convert.ToInt32(CboPais.SelectedValue)), CboDepartamento, "Id", "Datos");
                ClUtilitarios.AgregarSeleccioneCombo(CboDepartamento, ClTraductor.BuscaString(Session["Idioma"].ToString(), "49"), Session["Idioma"].ToString());
                CboDepartamento.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["DepartamentoId"].ToString();
                CboDepartamento.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["Departamento"].ToString();
                CboMunicipio.ClearSelection();
                CboMunicipio.Items.Clear();
                ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Municipio(Session["Idioma"].ToString(), Convert.ToInt32(CboDepartamento.SelectedValue)), CboMunicipio, "Id", "Datos");
                ClUtilitarios.AgregarSeleccioneCombo(CboMunicipio, ClTraductor.BuscaString(Session["Idioma"].ToString(), "50"), Session["Idioma"].ToString());
                CboMunicipio.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["MunicipioId"].ToString();
                CboMunicipio.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["Municipio"].ToString();
                TxtTelCasa.Value                 = dsUsuario.Tables["Datos"].Rows[0]["Telefono"].ToString();
                TxtTelMovil.Value                = dsUsuario.Tables["Datos"].Rows[0]["Telefono_Movil"].ToString();
                TxtCorreo.Value                  = dsUsuario.Tables["Datos"].Rows[0]["Correo"].ToString();
                TxtCorreoAnt.Text                = dsUsuario.Tables["Datos"].Rows[0]["Correo"].ToString();
                TxtIdNo.Value                    = dsUsuario.Tables["Datos"].Rows[0]["No_Identificacion"].ToString();
                TxtFecNac.Value                  = string.Format("{0:yyyy-MM-dd}", dsUsuario.Tables["Datos"].Rows[0]["Fecha_Nacimiento"]);
                CboTipoUsuario.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["Tipo_UsuarioId"].ToString();
                CboTipoUsuario.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["tipusuarioper"].ToString();
                TxtDireccion.Value               = dsUsuario.Tables["Datos"].Rows[0]["direccion"].ToString();
                TxtPersonaId.Text                = dsUsuario.Tables["Datos"].Rows[0]["PersonaId"].ToString();

                dsUsuario.Clear();
                BtnGrabar.Visible = true;
            }
            else if (e.CommandName == "CmdEspecialidades")
            {
                RadWindowDetalle.Title       = ClTraductor.BuscaString(Session["Idioma"].ToString(), "104");
                RadWindowDetalle.NavigateUrl = "~/WebForms/Wfrm_Especialidades.aspx?Benutzer=" + HttpUtility.UrlEncode(ClUtilitarios.Encrypt(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UsuarioId"].ToString(), true)) + "";
                ScriptManager.RegisterStartupScript(this, this.GetType(), "key", "function f(){$find('" + RadWindowDetalle.ClientID + "').show();Sys.Application.remove_load(f);}Sys.Application.add_load(f);", true);
            }
        }
Exemplo n.º 5
0
 private void CboDepartamento_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (CboDepartamento.SelectedIndex != 0)
     {
         CboMunicipio.ClearSelection();
         CboMunicipio.Items.Clear();
         ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Municipio(Session["Idioma"].ToString(), Convert.ToInt32(CboDepartamento.SelectedValue)), CboMunicipio, "Id", "Datos");
         ClUtilitarios.AgregarSeleccioneCombo(CboMunicipio, ClTraductor.BuscaString(Session["Idioma"].ToString(), "50"), Session["Idioma"].ToString());
     }
     else
     {
         CboMunicipio.ClearSelection();
         CboMunicipio.Items.Clear();
     }
 }
Exemplo n.º 6
0
 void Limpiar()
 {
     CboAlias.ClearSelection();
     TxtNombres.Value   = "";
     TxtApellidos.Value = "";
     CboGenero.ClearSelection();
     TxtIdNo.Value      = "";
     TxtDireccion.Value = "";
     CboMunicipio.ClearSelection();
     CboDepartamento.ClearSelection();
     CboPais.ClearSelection();
     TxtTelCasa.Value  = "";
     TxtTelMovil.Value = "";
     TxtCorreo.Value   = "";
     TxtFecNac.Value   = "";
     CboTipoUsuario.ClearSelection();
     TxtUsuarioId.Text = "";
     TxtCorreoAnt.Text = "";
 }
Exemplo n.º 7
0
        private void GrdDetalle_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
        {
            if (e.CommandName == "CmdEditar")
            {
                DataSet dsUsuario = ClUsuario.GetDatosUsuarioId(Convert.ToInt32(e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UsuarioId"].ToString()), Session["Idioma"].ToString());
                TxtUsuarioId.Text           = e.Item.OwnerTableView.DataKeyValues[e.Item.ItemIndex]["UsuarioId"].ToString();
                CboAlias.SelectedValue      = dsUsuario.Tables["Datos"].Rows[0]["AliasIid"].ToString();
                CboAlias.SelectedItem.Text  = dsUsuario.Tables["Datos"].Rows[0]["aliasper"].ToString();
                TxtNombres.Value            = dsUsuario.Tables["Datos"].Rows[0]["Nombres"].ToString();
                TxtApellidos.Value          = dsUsuario.Tables["Datos"].Rows[0]["Apellidos"].ToString();
                CboGenero.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["GeneroId"].ToString();
                CboGenero.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["generoper"].ToString();
                CboPais.SelectedValue       = dsUsuario.Tables["Datos"].Rows[0]["PaisId"].ToString();
                CboPais.SelectedItem.Text   = dsUsuario.Tables["Datos"].Rows[0]["paisper"].ToString();
                CboDepartamento.ClearSelection();
                CboMunicipio.ClearSelection();
                CboDepartamento.Items.Clear();
                CboMunicipio.Items.Clear();
                ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Departamento(Session["Idioma"].ToString(), Convert.ToInt32(CboPais.SelectedValue)), CboDepartamento, "Id", "Datos");
                ClUtilitarios.AgregarSeleccioneCombo(CboDepartamento, ClTraductor.BuscaString(Session["Idioma"].ToString(), "49"), Session["Idioma"].ToString());
                CboDepartamento.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["DepartamentoId"].ToString();
                CboDepartamento.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["Departamento"].ToString();
                CboMunicipio.ClearSelection();
                CboMunicipio.Items.Clear();
                ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Municipio(Session["Idioma"].ToString(), Convert.ToInt32(CboDepartamento.SelectedValue)), CboMunicipio, "Id", "Datos");
                ClUtilitarios.AgregarSeleccioneCombo(CboMunicipio, ClTraductor.BuscaString(Session["Idioma"].ToString(), "50"), Session["Idioma"].ToString());
                CboMunicipio.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["MunicipioId"].ToString();
                CboMunicipio.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["Municipio"].ToString();
                TxtTelCasa.Value                 = dsUsuario.Tables["Datos"].Rows[0]["Telefono"].ToString();
                TxtTelMovil.Value                = dsUsuario.Tables["Datos"].Rows[0]["Telefono_Movil"].ToString();
                TxtCorreo.Value                  = dsUsuario.Tables["Datos"].Rows[0]["Correo"].ToString();
                TxtCorreoAnt.Text                = dsUsuario.Tables["Datos"].Rows[0]["Correo"].ToString();
                TxtIdNo.Value                    = dsUsuario.Tables["Datos"].Rows[0]["No_Identificacion"].ToString();
                TxtFecNac.Value                  = string.Format("{0:yyyy-MM-dd}", dsUsuario.Tables["Datos"].Rows[0]["Fecha_Nacimiento"]);
                CboTipoUsuario.SelectedValue     = dsUsuario.Tables["Datos"].Rows[0]["Tipo_UsuarioId"].ToString();
                CboTipoUsuario.SelectedItem.Text = dsUsuario.Tables["Datos"].Rows[0]["tipusuarioper"].ToString();
                TxtDireccion.Value               = dsUsuario.Tables["Datos"].Rows[0]["direccion"].ToString();
                TxtPersonaId.Text                = dsUsuario.Tables["Datos"].Rows[0]["PersonaId"].ToString();

                dsUsuario.Clear();
            }
        }