private void Cargar()
        {
            try
            {
                DateTime oDate;
                WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
                wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
                WSGestion.MOD_Mascota obj = new WSGestion.MOD_Mascota();
                obj = wsgest.SEL_GRID_BY_ID_Mascota(codigo_seleccionado);
                lbl_id_mascota.Text = obj.MAS_id_mascota.ToString();
                lbl_raza.Text = obj.RAZ_descripcion;
                lbl_nombre_mascota.Text = obj.MAS_nombre;
                oDate = DateTime.Parse(obj.MAS_fecha_nacimiento);
                lbl_fecha_nacimiento.Text = oDate.ToShortDateString();
                lbl_color.Text = obj.MAS_color;
                lbl_observaciones.Text = obj.MAS_observaciones;
                if (obj.MAS_sexo == "M")
                {
                    lbl_sexo.Text = "Macho";
                }
                else
                {
                    lbl_sexo.Text = "Hembra";
                }

                WSGestion.MOD_Dueno obj2 = new WSGestion.MOD_Dueno();
                obj2 = wsgest.SEL_GRID_BY_ID_Dueno(codigo_seleccionado_dueno);
                lbl_nombre_dueno.Text = obj2.DUE_nombre + " " + obj2.DUE_apellido1 + " " + obj2.DUE_apellido2;
                lbl_id_dueno.Text = obj2.DUE_id_dueno.ToString();
                lbl_telefono.Text = obj2.DUE_telefono;
                lbl_celular.Text = obj2.DUE_celular;

                WSGestion.MOD_Expediente obj3 = new WSGestion.MOD_Expediente();
                obj3 = wsgest.SEL_GRID_Expediente_BY_ID_Mascota(codigo_seleccionado,centro);
                lbl_numero_expediente.Text = obj3.EXP_id_expediente.ToString();
                codigo_expediente_seleccionado = obj3.EXP_id_expediente;
                oDate = DateTime.Parse(obj3.EXP_fecha_creacion);
                lbl_fecha_generacion.Text = oDate.ToShortDateString();
            }
            catch (Exception)
            {
                WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
                wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
                Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Codigo_Select"] = "0";
            }
        }
        private void Cargar()
        {
            try
            {
                DateTime oDate;

                WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
                wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");

                WSGestion.MOD_Expediente obj3 = new WSGestion.MOD_Expediente();
                obj3 = wsgest.SEL_GRID_Expediente_BY_ID_Mascota(codigo_seleccionado, centro);
                lbl_numero_expediente.Text = obj3.EXP_id_expediente.ToString();

                if (obj3.EXP_id_expediente != 0)
                {
                    codigo_expediente_seleccionado = obj3.EXP_id_expediente;
                    oDate = DateTime.Parse(obj3.EXP_fecha_creacion);
                    lbl_fecha_generacion.Text = oDate.ToShortDateString();

                    WSGestion.MOD_Mascota obj = new WSGestion.MOD_Mascota();
                    obj = wsgest.SEL_GRID_BY_ID_Mascota(codigo_seleccionado);
                    lbl_id_mascota.Text = obj.MAS_id_mascota.ToString();
                    lbl_raza.Text = obj.RAZ_descripcion;
                    lbl_nombre_mascota.Text = obj.MAS_nombre;
                    oDate = DateTime.Parse(obj.MAS_fecha_nacimiento);
                    lbl_fecha_nacimiento.Text = oDate.ToShortDateString();
                    lbl_color.Text = obj.MAS_color;
                    lbl_observaciones.Text = obj.MAS_observaciones;
                    if (obj.MAS_sexo == "M")
                    {
                        lbl_sexo.Text = "Macho";
                    }
                    else
                    {
                        lbl_sexo.Text = "Hembra";
                    }

                    WSGestion.MOD_Dueno obj2 = new WSGestion.MOD_Dueno();
                    obj2 = wsgest.SEL_GRID_BY_ID_Dueno(codigo_seleccionado_dueno);
                    lbl_nombre_dueno.Text = obj2.DUE_nombre + " " + obj2.DUE_apellido1 + " " + obj2.DUE_apellido2;
                    lbl_id_dueno.Text = obj2.DUE_id_dueno.ToString();
                    lbl_telefono.Text = obj2.DUE_telefono;
                    lbl_celular.Text = obj2.DUE_celular;
                }
                else
                {
                    Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Codigo_Select"] = "0";
                    Alert_Mensaje.Attributes["class"] = "alert alert-warning";
                    mensaje_alerta = "No se tiene un expediente para la mascota";
                    titulo_mensaje_alerta = "Advertencia: ";
                    Alert_Mensaje.Visible = true;
                }

            }
            catch (Exception exc)
            {
                WSGestion.WSGestion wsgest = new WSGestion.WSGestion();
                wsgest.Url = ConfigurationManager.AppSettings.Get("dirWs");
                Session[wsgest.Get_usu_id_session(Session.SessionID.ToString())+"Codigo_Select"] = "0";
                Alert_Mensaje.Attributes["class"] = "alert alert-danger";
                mensaje_alerta = exc.ToString();
                titulo_mensaje_alerta = "Error: ";
                Alert_Mensaje.Visible = true;
            }
        }