private void returnaNombre() { if (this.cedulaRG.Value != string.Empty) { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); Cls_Persona_DAL Obj_Persona_DAL = new Cls_Persona_DAL(); Obj_Persona_DAL.sIdPersona = this.cedulaRG.Value.Trim(); Obj_Persona_BLL.crudPersona(ref Obj_Persona_DAL, BD.Filtrar); if (Obj_Persona_DAL.sMsjError == string.Empty) { if (Obj_Persona_DAL.DS.Tables[0].Rows.Count > 0) { this.nombreRG.Value = Obj_Persona_DAL.DS.Tables[0].Rows[0][1].ToString(); } else { Response.Write("<script>window.alert('La cedula ingresada no corresponde a ningun cliente. Por favro ingrese un cliente valido');</script>"); this.nombreRG.Value = string.Empty; } } else { Response.Write("<script>window.alert('Error a consultar datos, comunicarse con la administracion');</script>"); this.nombreRG.Value = string.Empty; } } }
private string returnaNombre(string cedula) { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); Cls_Persona_DAL Obj_Persona_DAL = new Cls_Persona_DAL(); Obj_Persona_DAL.sIdPersona = cedula.Trim(); Obj_Persona_BLL.crudPersona(ref Obj_Persona_DAL, BD.Filtrar); if (Obj_Persona_DAL.sMsjError == string.Empty) { if (Obj_Persona_DAL.DS.Tables[0].Rows.Count > 0) { return(Obj_Persona_DAL.DS.Tables[0].Rows[0][1].ToString()); } else { Response.Write("<script>window.alert('PERSONA NO REGISTRADA INGRESE AL BOTON DE PERSONAS');</script>"); ////this.mensajeError.InnerHtml = "PERSONA NO REGISTRADA INGRESE AL BOTON DE PERSONAS"; return(string.Empty); } } else { Response.Write("<script>window.alert('Error al consultar persona, Contactar TI');</script>"); this.mensajeError.InnerHtml = "Error al consultar persona, Contactar TI"; return(string.Empty); } }
private void CargarPersona() { Cls_Persona_DAL Obj_Persona_DAL = new Cls_Persona_DAL(); Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); Obj_Persona_BLL.crudPersona(ref Obj_Persona_DAL, BD.Listar); DropDownPersona.DataSource = Obj_Persona_DAL.DS.Tables[0]; DropDownPersona.DataTextField = "Nombre"; DropDownPersona.DataValueField = "Identificacion"; DropDownPersona.DataBind(); }
private void LlenarDDL() //Llenado del Drop down list { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); Cls_Persona_DAL Obj_Persona_DAL = new Cls_Persona_DAL(); Obj_Persona_BLL.crudPersona(ref Obj_Persona_DAL, BD.Listar); DropDownTUsuarios.DataSource = Obj_Persona_DAL.DS.Tables[0]; DropDownTUsuarios.DataValueField = "Identificacion"; DropDownTUsuarios.DataTextField = "Nombre"; DropDownTUsuarios.DataBind(); DropDownTUsuarios.Items.Insert(0, "Seleccione una persona"); }
protected void Registrarse(object sender, EventArgs e) { Cls_Persona_DAL Obj_Persona_DAL = new Cls_Persona_DAL(); Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); Obj_Persona_DAL.sIdPersona = this.cedulaRG.Value.ToString().Trim(); Obj_Persona_DAL.sNombre = this.nombreRG.Value.ToString().Trim(); Obj_Persona_DAL.sDireccion = this.direccionRG.Value.ToString().Trim(); Obj_Persona_DAL.bIdRol = (byte)Rol.Cliente; Obj_Persona_BLL.crudPersona(ref Obj_Persona_DAL, BD.Insertar); Cls_Telefonos_DAL Obj_Telefonos_DAL = new Cls_Telefonos_DAL(); Cls_Telefono_BLL Obj_Telefonos_BLL = new Cls_Telefono_BLL(); Obj_Telefonos_DAL.sTelefono = this.telefonoRG.Value.ToString().Trim(); Obj_Telefonos_DAL.sIdPersona = this.cedulaRG.Value.ToString().Trim(); Obj_Telefonos_BLL.crudTelefono(ref Obj_Telefonos_DAL, BD.Insertar);// insertar Cls_Correos_DAL Obj_Correo_DAL = new Cls_Correos_DAL(); Cls_Correos_BLL Obj_Correo_BLL = new Cls_Correos_BLL(); Obj_Correo_DAL.sIdPersona = this.cedulaRG.Value.ToString().Trim(); Obj_Correo_DAL.sCorreo = this.emailRG.Value.ToString().Trim(); Obj_Correo_BLL.crudCorreos(ref Obj_Correo_DAL, BD.Insertar);// insertar Cls_Clientes_DAL Obj_Cliente_DAL = new Cls_Clientes_DAL(); Cls_Clientes_BLL Obj_Cliente_BLL = new Cls_Clientes_BLL(); Obj_Cliente_DAL.sIdPersona = this.cedulaRG.Value.ToString().Trim(); Obj_Cliente_DAL.bIdTipoCliente = (byte)Cliente.Socio; Obj_Cliente_BLL.crudCliente(ref Obj_Cliente_DAL, BD.Insertar); Cls_Usuario_DAL Obj_Usuario_DAL = new Cls_Usuario_DAL(); Cls_Usuario_BLL Obj_Usuario_BLL = new Cls_Usuario_BLL(); Obj_Usuario_DAL.SIdUsuario = this.cedulaRG.Value.ToString().Trim(); Obj_Usuario_DAL.SIdPersona = this.cedulaRG.Value.ToString().Trim(); Obj_Usuario_DAL.SContrasena = this.passwordRG.Value.ToString().Trim(); Obj_Usuario_BLL.Encripta(ref Obj_Usuario_DAL); Obj_Usuario_BLL.crudUsuario(ref Obj_Usuario_DAL, BD.Insertar); Obj_Persona_DAL.sIdPersona = this.cedulaRG.Value.ToString().Trim(); Obj_Persona_BLL.crudPersona(ref Obj_Persona_DAL, BD.Filtrar); Session["Login"] = Obj_Persona_DAL; Server.Transfer("IndexCliente.aspx"); }
public bool eliminarPersona(string sIdPersona, ref string sMsjError) { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); return(Obj_Persona_BLL.Eliminar(sIdPersona, ref sMsjError)); }
public bool actualizarPersona(string sIdPersona, string sNombre, string sDireccion, short sIdRol, ref string sMsjError) { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); return(Obj_Persona_BLL.Actualizar(sIdPersona, sNombre, sDireccion, sIdRol, ref sMsjError)); }
public DataTable filtrarPersonaV(string sIdPersona, string sNombre, string sDireccion, string sRol, ref string sMsjError) { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); return(Obj_Persona_BLL.Filtrar(sIdPersona, sNombre, sDireccion, sRol, ref sMsjError)); }
public DataTable listarPersona(ref string sMsjError) { Cls_Persona_BLL Obj_Persona_BLL = new Cls_Persona_BLL(); return(Obj_Persona_BLL.Listar(ref sMsjError)); }