protected void Page_Load(object sender, EventArgs e) { this.tordenadn = new TOrdenAdn(); ord = new OrdenAdn(); this.dtexamenes = new DTexamenes(); String valor = Request.QueryString["id"]; int id = int.Parse(valor); ord.Id_orden = id; Mtipoorden.DataSource = dtexamenes.listarexamenes(); //aqui le paso mi consulta que esta en la clase dtdepartamento Mtipoorden.DataTextField = "Nombre"; //le paso el texto del items Mtipoorden.DataValueField = "Id_examenes"; //le paso el id de cada items Mtipoorden.DataBind(); this.registro = tordenadn.getOrdenporid(id); Id_orden.Value = valor; if (registro.Read()) { this.ord.Tipo_caso = this.registro["Tipo_caso"].ToString(); ord.Tipo_orden = this.registro["Id_examenes"].ToString(); ord.Observaciones = this.registro["Observaciones"].ToString(); ord.Baucher = this.registro["Baucher"].ToString(); ord.No_orden = int.Parse(this.registro["No_orden"].ToString()); ord.Estado = this.registro["Estado"].ToString(); this.ord.Fecha = this.registro["Fecha"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { this.dtadnpaternidad = new DTAdnPaternidad(); dtexamen = new DTexamenes(); ord = new OrdenAdn(); //Obtener id del cliente String valor = Request.QueryString["id"]; int id = int.Parse(valor); ord.Id_orden = id; this.registro = dtadnpaternidad.getOrdenporid(id); Id_orden.Value = valor; //Comenzamos a recorer el sqldatareader if (registro.Read()) { //seteamos los datos de los campos de ese cliente this.ord.Id_codigo = this.registro["Id_codigo"].ToString(); ord.Nombre_pareja = this.registro["Nombre_pareja"].ToString(); ord.Nombre_menor = this.registro["Nombre_menor"].ToString(); ord.Fecha = Convert.ToDateTime(this.registro["Fecha"].ToString()); ord.Tipo_Caso = this.registro["Tipo_caso"].ToString(); ord.Observaciones = this.registro["Observaciones"].ToString(); ord.Baucher = this.registro["Baucher"].ToString(); } }
protected void Page_Load(object sender, EventArgs e) { this.tOrden = new TOrdenAdn(); this.dtexamenes = new DTexamenes(); this.conexion = new Conexion(); this.registro = this.tOrden.listarTodo(); if (!IsPostBack) { //en esta parte se carga el dropdownlist Mtipoorden.DataSource = dtexamenes.listarexamenes(); //aqui le paso mi consulta que esta en la clase dtdepartamento Mtipoorden.DataTextField = "Nombre"; //le paso el texto del items Mtipoorden.DataValueField = "Id_examenes"; //le paso el id de cada items Mtipoorden.DataBind(); ListItem li = new ListItem("SELECCIONE", "0"); //creamos una lista, para agregar el seleccione Mtipoorden.Items.Insert(0, li); //agregamis el seleccione en la posicion uno } }
protected void Page_Load(object sender, EventArgs e) { this.dtadnpaternidad = new DTAdnPaternidad(); dtexamen = new DTexamenes(); ord = new OrdenAdn(); //Obtener id del cliente String valor = Request.QueryString["id"]; int id = int.Parse(valor); ord.Id_orden = id; //Comenzamos a recorer el sqldatareader if (registro.Read()) { //seteamos los datos de los campos de ese cliente this.ord.Id_codigo = this.registro["Id_codigo"].ToString(); ord.Nombre_pareja = this.registro["Nombre_pareja"].ToString(); ord.Nombre_menor = this.registro["Nombre_menor"].ToString(); ord.Fecha = Convert.ToDateTime(this.registro["Fecha"].ToString()); ord.Tipo_Caso = this.registro["Tipo_caso"].ToString(); ord.Observaciones = this.registro["Observaciones"].ToString(); ord.Baucher = this.registro["Baucher"].ToString(); //Datos Cliente idcliente = Convert.ToInt32(registro["Id_cliente"].ToString()); } //Mostrar datos en el textbox this.cliente = NGcliente.getInstance().ListarClientePorId(idcliente); if (cliente.Read()) { Mcliente.Text = cliente["Nombre"].ToString() + " " + cliente["Apellido"].ToString(); Mcedula.Text = cliente["Cedula"].ToString(); } }
public SqlDataReader ListarExamenPorId(int id) { return(DTexamenes.getInstance().getExamenporid(id)); }
public SqlDataReader ListarExamenes() { return(DTexamenes.getInstance().listarexamenes()); }
public bool Modificarexamen(Examen examen) { return(DTexamenes.getInstance().modificar(examen)); }
public bool guardarexamen(Examen examen) { return(DTexamenes.getInstance().crear(examen)); }