コード例 #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;
     }
 }
コード例 #2
0
        void CargaDatosCliente()
        {
            DataSet DsDatoCliente = Clcliente.GetDatosCliente(Convert.ToInt32(Session["ClienteId"]));

            TxtNombres.Value      = DsDatoCliente.Tables["Datos"].Rows[0]["Nombres"].ToString();
            TxtApellidos.Value    = DsDatoCliente.Tables["Datos"].Rows[0]["Apellidos"].ToString();
            TxtIdNo.Value         = DsDatoCliente.Tables["Datos"].Rows[0]["No_Identificacion"].ToString();
            TxtDireccion.Value    = DsDatoCliente.Tables["Datos"].Rows[0]["Direccion"].ToString();
            CboPais.SelectedValue = DsDatoCliente.Tables["Datos"].Rows[0]["PaisId"].ToString();
            CboPais.Text          = DsDatoCliente.Tables["Datos"].Rows[0]["Pais"].ToString();
            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());
            ClUtilitarios.Fill_DropDownAsp(ClCatalogos.Catalogo_Universidad(Session["Idioma"].ToString(), Convert.ToInt32(CboPais.SelectedValue)), CboUniverisidad, "Id", "Datos");
            ClUtilitarios.AgregarSeleccioneCombo(CboUniverisidad, ClTraductor.BuscaString(Session["Idioma"].ToString(), "53"), Session["Idioma"].ToString());
            CboDepartamento.SelectedValue = DsDatoCliente.Tables["Datos"].Rows[0]["DepartamentoId"].ToString();
            CboDepartamento.Text          = DsDatoCliente.Tables["Datos"].Rows[0]["Departamento"].ToString();
            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 = DsDatoCliente.Tables["Datos"].Rows[0]["MunicipioId"].ToString();
            CboMunicipio.Text          = DsDatoCliente.Tables["Datos"].Rows[0]["Municipio"].ToString();
            TxtTelCasa.Value           = DsDatoCliente.Tables["Datos"].Rows[0]["Telefono"].ToString();
            TxtTelMovil.Value          = DsDatoCliente.Tables["Datos"].Rows[0]["Telefono_Movil"].ToString();
            TxtCorreo.Value            = DsDatoCliente.Tables["Datos"].Rows[0]["Correo"].ToString();
            TxtUsuario.Value           = Session["Usuario"].ToString();
            TxtCorreoOriginal.Text     = DsDatoCliente.Tables["Datos"].Rows[0]["Correo"].ToString();
            TxtUsuarioOriginal.Text    = Session["Usuario"].ToString();
            DsDatoCliente.Clear();
        }
コード例 #3
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);
            }
        }
コード例 #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();
            }
        }