示例#1
0
        public JQGrid ListarPersonas(FiltroPersona objFiltroPersona)
        {
            JQGrid         objJQGrid = new JQGrid();
            List <Persona> lst       = new List <Persona>();

            try
            {
                lst = LlenarListaPersonas(objFiltroPersona);

                List <string> lstCampos = new List <string>();
                lstCampos.Add("iCodPer");
                lstCampos.Add("vNomPer");
                lstCampos.Add("vApePat");
                lstCampos.Add("vApeMat");
                lstCampos.Add("iNumTelefonico");
                lstCampos.Add("vSexo");
                lstCampos.Add("vArea");
                lstCampos.Add("sdFecha");

                objJQGrid = SAT.Libreria.JavaScript.JQuery.ListJQGrid <Persona>(lst, lstCampos, TipoAdministracionPaginacion.PorClase);

                return(objJQGrid);
            }
            catch (WebException e)
            {
                Excepcion excepcion = new Excepcion();
                excepcion = ExcepcionWeb.ProcesarExcepcion(e);

                throw new Exception(excepcion.Identificador + ": " + excepcion.Description);
            }
            catch
            {
                throw;
            }
        }
示例#2
0
        public void RegistrarPersonas(Persona persona)
        {
            try
            {
                int iCodPer = listaPersona.Lista.Count() + 1;
                persona.iCodPer = iCodPer;
                listaPersona.Lista.Add(persona);
            }
            catch (WebException e)
            {
                Excepcion excepcion = new Excepcion();
                excepcion = ExcepcionWeb.ProcesarExcepcion(e);

                throw new Exception(excepcion.Identificador + ": " + excepcion.Description);
            }
            catch
            {
                throw;
            }
        }