Пример #1
0
        public ActionResult UpdateUser(string id)
        {
            // Cargar los datos del usuario a modificar
            RequestAdminUser      req   = new RequestAdminUser();
            ResponseAdminUserList res   = new ResponseAdminUserList();
            LogicAdminUser        logic = new LogicAdminUser();


            req.id = int.Parse(id);
            res    = logic.getUserList(req);

            // Recuperar los campos de la persona
            RequestPerson      reqPer   = new RequestPerson();
            ResponsePersonList resPer   = new ResponsePersonList();
            LogicAdminPerson   logicPer = new LogicAdminPerson();

            reqPer.id = res.lst[0].idPerson;
            resPer    = logicPer.getPerson(reqPer);

            // Setear los campos del modelo
            req.attemps        = res.lst[0].attemps;
            req.dateBorn       = resPer.lst[0].dateBorn;
            req.dateRegister   = res.lst[0].dateRegister;
            req.dateUpdate     = res.lst[0].dateUpdate;
            req.document       = resPer.lst[0].document;
            req.firstLastName  = resPer.lst[0].firstLastName;
            req.firstName      = resPer.lst[0].firstName;
            req.flag           = 'M';
            req.homeAddress    = resPer.lst[0].homeAddress;
            req.homePhone      = resPer.lst[0].homePhone;
            req.idRole         = res.lst[0].idRole;
            req.idPerson       = res.lst[0].idPerson;
            req.loginName      = res.lst[0].loginName;
            req.movilPhone1    = resPer.lst[0].movilPhone1;
            req.movilPhone2    = resPer.lst[0].movilPhone2;
            req.name           = res.lst[0].name;
            req.personalKey    = res.lst[0].personalKey;
            req.profession     = resPer.lst[0].profession;
            req.secondLastName = resPer.lst[0].secondLastName;
            req.secondName     = resPer.lst[0].secondName;
            req.stateRecord    = res.lst[0].stateRecord;
            req.typeDocument   = resPer.lst[0].typeDocument;
            req.userRegister   = res.lst[0].userRegister;
            req.userUpdate     = res.lst[0].userUpdate;
            req.workPhone      = resPer.lst[0].workPhone;
            req.workplace      = resPer.lst[0].workplace;

            Tuple <ResponseAdminUserList, RequestAdminUser, ResponseAdminUserDetail, ResponseAdminUser> response =
                new Tuple <ResponseAdminUserList, RequestAdminUser, ResponseAdminUserDetail, ResponseAdminUser>(res, req, null, null);

            return(View(response));
        }
Пример #2
0
        public ActionResult User()
        {
            // Obtener el listado de Usuarios
            RequestAdminUser      req   = new RequestAdminUser();
            ResponseAdminUserList res   = new ResponseAdminUserList();
            LogicAdminUser        logic = new LogicAdminUser();

            req.id          = 0;
            res             = logic.getUserList(req);
            req.stateRecord = true;

            Tuple <ResponseAdminUserList, RequestAdminUser, ResponseAdminUserDetail, ResponseAdminUser> response =
                new Tuple <ResponseAdminUserList, RequestAdminUser, ResponseAdminUserDetail, ResponseAdminUser>(res, null, null, null);

            return(View(response));
        }