public SelectFuncionario ( |
||
oENTFuncionario | Entidad de Funcionario con los filtros necesarios para la consulta | |
return |
void SelectDoctor() { BPFuncionario oBPFuncionario = new BPFuncionario(); ENTFuncionario oENTFuncionario = new ENTFuncionario(); ENTResponse oENTResponse = new ENTResponse(); try { // Formulario oENTFuncionario.FuncionarioId = 0; oENTFuncionario.idUsuario = 0; oENTFuncionario.idArea = 0; oENTFuncionario.idRol = 14; // Atención a Víctimas - Doctor oENTFuncionario.TituloId = 0; oENTFuncionario.PuestoId = 0; oENTFuncionario.Nombre = ""; // Transacción oENTResponse = oBPFuncionario.SelectFuncionario(oENTFuncionario); // Errores if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } // Warnings if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + oENTResponse.sMessage + "');", true); } // Llenado de control this.ddlDoctor.DataTextField = "sFullName"; this.ddlDoctor.DataValueField = "FuncionarioId"; this.ddlDoctor.DataSource = oENTResponse.dsResponse.Tables[1]; this.ddlDoctor.DataBind(); // Opción todos this.ddlDoctor.Items.Insert(0, new ListItem("[Seleccione]", "0")); }catch (Exception ex){ throw (ex); } }
void SelectFuncionario() { ENTFuncionario oENTFuncionario = new ENTFuncionario(); ENTResponse oENTResponse = new ENTResponse(); BPFuncionario oBPFuncionario = new BPFuncionario(); try { // Formulario oENTFuncionario.FuncionarioId = 0; oENTFuncionario.idUsuario = 0; oENTFuncionario.idArea = 0; oENTFuncionario.idRol = 11; // Seguimiento - Defensor oENTFuncionario.TituloId = 0; oENTFuncionario.PuestoId = 0; oENTFuncionario.Nombre = ""; // Transacción oENTResponse = oBPFuncionario.SelectFuncionario(oENTFuncionario); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } // Mensaje de la BD if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + gcJavascript.ClearText(oENTResponse.sMessage) + "');", true); } // Llenado de combo this.ddlFuncionario.DataTextField = "sFullName"; this.ddlFuncionario.DataValueField = "FuncionarioId"; this.ddlFuncionario.DataSource = oENTResponse.dsResponse.Tables[1]; this.ddlFuncionario.DataBind(); // Agregar Item de selección this.ddlFuncionario.Items.Insert(0, new ListItem("[Seleccione]", "0")); }catch (Exception ex){ throw (ex); } }
private void SelectFuncionario() { ENTFuncionario oENTFuncionario = new ENTFuncionario(); ENTResponse oENTResponse = new ENTResponse(); BPFuncionario oBPFuncionario = new BPFuncionario(); String sMessage = ""; try { // Formulario oENTFuncionario.FuncionarioId = 0; oENTFuncionario.idUsuario = 0; oENTFuncionario.idArea = Int32.Parse(this.ddlArea.SelectedItem.Value); oENTFuncionario.TituloId = 0; oENTFuncionario.PuestoId = 0; oENTFuncionario.Nombre = this.txtNombre.Text; // Transacción oENTResponse = oBPFuncionario.SelectFuncionario(oENTFuncionario); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } // Mensaje de la BD if (oENTResponse.sMessage != "") { sMessage = "alert('" + oENTResponse.sMessage + "');"; } // Llenado de controles this.gvFuncionario.DataSource = oENTResponse.dsResponse.Tables[1]; this.gvFuncionario.DataBind(); // Mensaje al usuario ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), sMessage, true); }catch (Exception ex){ throw (ex); } }
private void SelectFuncionario_ForEdit(Int32 idFuncionario) { ENTFuncionario oENTFuncionario = new ENTFuncionario(); ENTResponse oENTResponse = new ENTResponse(); BPFuncionario oBPFuncionario = new BPFuncionario(); try { // Formulario oENTFuncionario.FuncionarioId = idFuncionario; oENTFuncionario.idUsuario = 0; oENTFuncionario.idArea = 0; oENTFuncionario.TituloId = 0; oENTFuncionario.PuestoId = 0; oENTFuncionario.Nombre = ""; // Transacción oENTResponse = oBPFuncionario.SelectFuncionario(oENTFuncionario); // Validaciones if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } // Mensaje de la BD this.lblActionMessage.Text = oENTResponse.sMessage; // Llenado de formulario this.ddlActionPuesto.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["PuestoId"].ToString(); this.ddlActionTitulo.SelectedValue = oENTResponse.dsResponse.Tables[1].Rows[0]["TituloId"].ToString(); this.wucBusquedaUsuario.UsuarioID = Int32.Parse(oENTResponse.dsResponse.Tables[1].Rows[0]["idUsuario"].ToString()); this.wucBusquedaUsuario.Area = oENTResponse.dsResponse.Tables[1].Rows[0]["sArea"].ToString(); this.wucCalendar.SetDate = oENTResponse.dsResponse.Tables[1].Rows[0]["dtFechaIngreso"].ToString(); }catch (Exception ex){ throw (ex); } }
void SelectFuncionario() { BPFuncionario oBPFuncionario = new BPFuncionario(); ENTFuncionario oENTFuncionario = new ENTFuncionario(); ENTResponse oENTResponse = new ENTResponse(); try { // Formulario oENTFuncionario.FuncionarioId = 0; oENTFuncionario.idUsuario = 0; oENTFuncionario.idRol = 8; // Visitaduría - Visitador oENTFuncionario.TituloId = 0; oENTFuncionario.PuestoId = 0; oENTFuncionario.Nombre = ""; // Si el área es coordinaci;on penitenciaria, se muestras los funcionarios de la tercer visitaduría oENTFuncionario.idArea = (this.hddAreaId.Value == "10" ? 6 : Int32.Parse(this.hddAreaId.Value)); // Transacción oENTResponse = oBPFuncionario.SelectFuncionario(oENTFuncionario); // Errores if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); } // Warnings if (oENTResponse.sMessage != "") { ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('" + oENTResponse.sMessage + "');", true); } // Llenado de control this.ddlFuncionario.DataTextField = "sFullName"; this.ddlFuncionario.DataValueField = "FuncionarioId"; this.ddlFuncionario.DataSource = oENTResponse.dsResponse.Tables[1]; this.ddlFuncionario.DataBind(); // Opción todos this.ddlFuncionario.Items.Insert(0, new ListItem("[Seleccione]", "0")); }catch (Exception ex){ throw (ex); } }