Ejemplo n.º 1
0
 //[AjaxMethod]
 //public string consultarIPS(string ips)
 //{
 //    Consulta c = new Consulta();
 //    DataTable myDataTable = c.consultarIpsXnombre(ips);
 //    myDataTable.Merge(c.consultarIpsXnit(ips));
 //    return DataTableASP.convertDatatableToString(myDataTable);
 //}
 //[AjaxMethod]
 //public string consultarSedeIps(string codIPS)
 //{
 //    Consulta c = new Consulta();
 //    return DataTableASP.convertDatatableToString(c.consultarSedesIPSxCodIps(codIPS));
 //}
 private void cargaCombosInicial()
 {
     try
     {
         MyMembershipProvider m = new MyMembershipProvider();
         DropDownListASP.AddItemToDropDownList(ref this.ddlIps, "SELECCIONE>>", "-1", true);
         DropDownListASP.AddItemToDropDownList(ref this.ddlSedeIps, "SELECCIONE>>", "-1", true);
         Consulta c = new Consulta();
         DropDownListASP.llenarDropDownList(c.consultarRegionales(), "value", "text", ref this.ddlRegional);
         DropDownListASP.AddItemToDropDownList(ref this.ddlRegional, "SELECCIONE>>", "-1", true);
         //DropDownListASP.llenarDropDownList(Utilities.convertArrayRolesToDataTable(Roles.GetAllRoles()), "value", "text", ref this.ddlRol);
         DropDownListASP.llenarDropDownList(m.consultarRoles(), "value", "text", ref this.ddlRol);
     }
     catch (Exception ex)
     {
         Logger.generarLogError(ex.Message, new StackFrame(true), ex);
         this.myRadWindowManager.RadAlert(Utilities.errorMessage(), 400, 200, Utilities.windowTitle(TypeMessage.error_message), null,
             Utilities.pathImageMessage(TypeMessage.error_message));
     }
 }
Ejemplo n.º 2
0
 private void consultarUsuario()
 {
     MyMembershipProvider m = new MyMembershipProvider();
     DataTable d = m.consultarRoles();
     Usuario u = m.consultarUsuarioXnombre(this.UserName.Text.Trim());
     if(u.idUsuario != -1){
         cargarCampos(true, u, d);
     }else{
         cargarCampos(false, null, null);
         this.MyRadWindowManager.RadAlert("El usuario " + this.UserName.Text.Trim() + " No se encontro en el sistema", 400, 200,
             Utilities.windowTitle(TypeMessage.information_message), null, Utilities.pathImageMessage(TypeMessage.information_message));
     }
 }