コード例 #1
0
        public AuthorizationFormPresenter(IAuthorizationForm authorizationForm, UserListModel model, IMessageBoxService messageService)
        {
            this.authorizationForm = authorizationForm;
            this.model             = model;
            this.messageService    = messageService;

            this.authorizationForm.LogIn += AuthorizationForm_LogIn;
        }
コード例 #2
0
        public async Task LoginCurrentUserAsync(UserListModel user)
        {
            accessTokenManager.Logout();
            applicationContext.ClearLoginInfo();
            dataStorageService.ClearSessionPersistance();

            await GoToLoginPageAsync();
        }
コード例 #3
0
        public string userList(int page, int rows)
        {
            UserListModel ulm = new UserListModel(page, rows);

            string json = JsonConvert.SerializeObject(ulm);

            return(json);
        }
コード例 #4
0
        public RegistrationFormPresenter(IRegistrationForm registrationForm, UserListModel model, IMessageBoxService messageService)
        {
            this.registrationForm = registrationForm;
            this.model            = model;
            this.messageService   = messageService;

            this.registrationForm.Register += RegistrationForm_Register;
        }
コード例 #5
0
ファイル: UserController.cs プロジェクト: snamper/Big-Master
        public virtual ActionResult UserList()
        {
            var um = new UserListModel {
                UserTable = _iUserServices.GetAllUser()
            };

            return(View("~/Views/User/UserList.cshtml", um));
        }
コード例 #6
0
ファイル: UserController.cs プロジェクト: nimafantasy/CRM
        public virtual ActionResult User()
        {
            UserListModel model = new UserListModel();

            model.Sections = GetSections();
            model.Active   = _active.GetActiveList();
            return(View(model));
        }
コード例 #7
0
        public ActionResult Index()
        {
            UserListModel model = new UserListModel();

            model.Users = _userService.GetAll();

            return(View(model));
        }
コード例 #8
0
        public IActionResult UserList()
        {
            var userListModel = new UserListModel();

            userListModel.Batsman = UserService.GetBatsman();
            userListModel.Bowler  = UserService.GetBowlers();
            return(View(userListModel));
        }
コード例 #9
0
 public IActionResult AddUserToRole(UserListModel model)
 {
     _dataService.AddUser(new UserRole {
         RoleId = HttpContext.Session.GetString("roleId"),
         UserId = model.UserId
     });
     return(View("CloseCurrentView"));
 }
コード例 #10
0
        public IActionResult Index()
        {
            var model = new UserListModel();

            model.Users = TestUsers.Users;  // TODO - add wrapper for this collection...

            return(View(model));
        }
コード例 #11
0
        public ActionResult UserGroup(string id)
        {
            var m = UserListModel.GetByGroupId(new Guid(id));

            ViewBag.Title = @Piranha.Resources.Settings.ListTitleUsers;

            return(View(@"~/Areas/Manager/Views/Settings/UserList.cshtml", m));
        }
コード例 #12
0
        public ActionResult UserList()
        {
            var m = UserListModel.Get();

            ViewBag.Title = @Piranha.Resources.Settings.ListTitleUsers;

            return(View(@"~/Areas/Manager/Views/Settings/UserList.cshtml", m));
        }
コード例 #13
0
        /// <summary>
        /// Gets the user list.
        /// </summary>
        /// <returns></returns>
        public PagedListModel <UserListModel> GetUserList(SearchPaginationListModel searchModel)
        {
            PagedListModel <UserListModel> userListModel = new PagedListModel <UserListModel>();

            try
            {
                SqlParameter[] parameters = new SqlParameter[6];
                parameters[0] = new SqlParameter("PAGENO", searchModel.pageNo);
                parameters[1] = new SqlParameter("RECORDPERPAGE", searchModel.limit);
                parameters[2] = new SqlParameter("SEARCHSTRING", searchModel.searchString);
                parameters[3] = new SqlParameter("COLUMN", searchModel.column);
                parameters[4] = new SqlParameter("DIRECTION", searchModel.direction);
                parameters[5] = new SqlParameter("STATUS", searchModel.Status);
                DataSet ds = DBHelper.GetDataTable("GETUSERLIST", parameters, DBHelper.ParseString(settings.Value.AppDbContext));
                if (ds != null && ds.Tables != null && ds.Tables.Count > 0)
                {
                    DataTable dt = ds.Tables[0];
                    userListModel.Items = new List <UserListModel>();
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        foreach (DataRow model in dt.Rows)
                        {
                            UserListModel uModel = new UserListModel();
                            if (DBHelper.ParseString(model["RoleType"]).Equals(1))
                            {
                                uModel.IsAdmin = "1";
                            }

                            uModel.UserId           = DBHelper.ParseInt64(DBHelper.ParseString(model["UserId"]));
                            uModel.FirstName        = DBHelper.ParseString(model["FirstName"]);
                            uModel.LastName         = DBHelper.ParseString(model["LastName"]);
                            uModel.CompanyName      = DBHelper.ParseString(model["Companyname"]);
                            uModel.EmailAddress     = DBHelper.ParseString(model["EmailAddress"]);
                            uModel.PhoneNumber      = DBHelper.ParseString(model["PhoneNumber"]);
                            uModel.Status           = DBHelper.ParseInt32(model["Status"]);
                            uModel.RoleType         = DBHelper.ParseInt32(model["RoleType"]);
                            uModel.UserAddressCount = DBHelper.ParseInt32(model["UserAddressCount"]);
                            userListModel.Items.Add(uModel);
                        }
                    }

                    DataTable dt1 = ds.Tables[1];
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        var row = dt1.Rows[0];
                        userListModel.Total = DBHelper.ParseInt32(row["Total"]);
                    }
                }

                //return context.User.Include(x => x.Country).Include(x => x.State).Where(x => x.IsDelete == false).ToList();
            }
            catch (Exception ex)
            {
                LogHelper.ExceptionLog(ex.Message + "  :::::  " + ex.StackTrace);
                throw ex;
            }
            return(userListModel);
        }
コード例 #14
0
        public ActionResult List(UserFilter filter)
        {
            var model = new UserListModel
            {
                Items = userRepository.Find(filter)
            };

            return(View(model));
        }
コード例 #15
0
        public void Put(Guid id, [FromBody] UserListModel userList)
        {
            var entity = _repository.GetById(id);

            entity.Update(userList.UserEmail, userList.Location, userList.Name,
                          userList.Description, userList.ImageUrl, userList.EventType, userList.StartTime, userList.EndTime);

            _repository.Edit(entity);
        }
コード例 #16
0
        public void Put(String id, [FromBody] UserListModel userList)
        {
            var entity = _repository.GetById(id);

            entity.Update(userList.UserId, userList.Location, userList.Id, userList.FacebookId, userList.Name,
                          userList.Description, userList.StartTime, userList.EndTime, userList.ImageURL);

            _repository.Edit(entity);
        }
コード例 #17
0
 public static UserListModel Save(UserListModel obj)
 {
     using (SchoolDataContext dbcontext = new SchoolDataContext())
     {
         // //dbcontext.User.Add(obj);
         dbcontext.SaveChanges();
     }
     return(obj);
 }
コード例 #18
0
        public UserListModel Create(IEnumerable <OrganizationRoleUserEntity> entities, IEnumerable <AddressEntity> addresses)
        {
            var model = new UserListModel();
            var userBasicInfoModels =
                entities.Select(entity => Create(entity, addresses.Where(address => address.AddressId == entity.User.HomeAddressId).FirstOrDefault()));

            model.Collection = userBasicInfoModels;
            return(model);
        }
コード例 #19
0
ファイル: UserController.cs プロジェクト: nuet/OWZXAPP
        /// <summary>
        /// 用户列表
        /// </summary>
        private ActionResult List(string userName, string email, string mobile, int userRid = 0, int adminGid = 0, int pageNumber = 1, int pageSize = 15)
        {
            string condition = AdminUsers.AdminGetUserListCondition(userName, email, mobile, userRid, adminGid);
            //管理员可以在后台修改自己的密码
            //if (condition != "")
            //    condition += " and owzx_users.uid<>" + WorkContext.Uid;
            //else
            //    condition = " owzx_users.uid<>" + WorkContext.Uid;

            PageModel pageModel = new PageModel(pageSize, pageNumber, AdminUsers.AdminGetUserCount(condition));

            List <SelectListItem> userRankList = new List <SelectListItem>();

            userRankList.Add(new SelectListItem()
            {
                Text = "全部等级", Value = "0"
            });
            foreach (UserRankInfo info in AdminUserRanks.GetUserRankList())
            {
                userRankList.Add(new SelectListItem()
                {
                    Text = info.Title, Value = info.UserRid.ToString()
                });
            }

            List <SelectListItem> adminGroupList = new List <SelectListItem>();

            adminGroupList.Add(new SelectListItem()
            {
                Text = "全部组", Value = "0"
            });
            foreach (AdminGroupInfo info in AdminGroups.GetAdminGroupList())
            {
                adminGroupList.Add(new SelectListItem()
                {
                    Text = info.Title, Value = info.AdminGid.ToString()
                });
            }

            UserListModel model = new UserListModel()
            {
                PageModel      = pageModel,
                UserList       = AdminUsers.AdminGetUserList(pageModel.PageSize, pageModel.PageNumber, condition),
                UserName       = userName,
                Email          = email,
                Mobile         = mobile,
                UserRid        = userRid,
                UserRankList   = userRankList,
                AdminGid       = adminGid,
                AdminGroupList = adminGroupList
            };

            ShopUtils.SetAdminRefererCookie(string.Format("{0}?pageNumber={1}&pageSize={2}&userName={3}&email={4}&mobile={5}&userRid={6}&adminGid={7}",
                                                          Url.Action("list"), pageModel.PageNumber, pageModel.PageSize,
                                                          userName, email, mobile, userRid, adminGid));
            return(View(model));
        }
コード例 #20
0
        // -> Exception
        private void RunGolangAndReadFile()
        {
            CreateTempFile();
            String input     = RunGolang("-r");
            String decrypted = ReadTempFile();

            UserList = JsonConvert.DeserializeObject <UserListModel>(decrypted);
            DeleteTempFile();
        }
コード例 #21
0
 public static TeamUser MapToEntity(TeamListModel teamListModel, UserListModel userListModel)
 {
     return(new TeamUser
     {
         Team = TeamMapper.MapToEntity(TeamMapper.ListToDetailModel(teamListModel)),
         TeamId = teamListModel.Id,
         User = UserMapper.MapToEntity(UserMapper.ListToDetailModel(userListModel)),
         UserId = userListModel.Id
     });
 }
コード例 #22
0
        protected virtual ActiveMemberSearchQuery GetActiveMemberSearchQuery(UserListModel model)
        {
            var activeUserSearchRequest = new ActiveMemberSearchQuery
            {
                Text = string.Empty,
                Skip = 0,
                Take = model.DisplayedAmount
            };

            return(activeUserSearchRequest);
        }
コード例 #23
0
        public ActionResult List(int accountId)
        {
            IList <UserInfo> userInfos = this.userService.GetUserList();
            UserListModel    model     = new UserListModel()
            {
                AccountId = accountId,
                Users     = userInfos
            };

            return(this.View(model));
        }
コード例 #24
0
ファイル: UserController.cs プロジェクト: raul10/Principal
        public async Task <IActionResult> Index(int pageIndex = 0, int pageSize = 20)
        {
            var users = await _userService.ListAsync(pageIndex : pageIndex, pageSize : pageSize);

            var model = new UserListModel()
            {
                Users = _mapper.Map <PagedResultModel <UserListItemModel> >(users)
            };

            return(View(model));
        }
コード例 #25
0
        /// <summary>
        /// Method that brings the memeber list from the selected company
        /// @author Mauricio C.
        /// </summary>
        private async void Pull_Search_Request_U()
        {
            HttpClient client = new HttpClient();
            string     url    = "http://" + LoginPage.ip + ":6969/" + company2.Email + "/memberList";
            var        result = await client.GetAsync(url);

            var           json     = result.Content.ReadAsStringAsync().Result;
            UserListModel newmodel = UserListModel.FromJson(json);

            StartList_U(newmodel);
        }
コード例 #26
0
 public static User MapListModelToEntity(UserListModel listModel)
 {
     return(new User
     {
         Id = listModel.Id,
         Name = listModel.Name,
         Email = listModel.Email,
         Password = listModel.Password,
         LastLoginTime = listModel.LastLoginTime
     });
 }
コード例 #27
0
 public static UserDetailModel ListToDetailModel(UserListModel userListModel)
 {
     return(new UserDetailModel
     {
         Id = userListModel.Id,
         Name = userListModel.Name,
         Email = userListModel.Email,
         Password = userListModel.Password,
         LastLoginTime = userListModel.LastLoginTime
     });
 }
コード例 #28
0
 public PartialViewResult ListAjax(UserListModel model)
 {
     if (ModelState.IsValid)
     {
         if (model.DeleteId.HasValue)
         {
             UserModel.Delete(model.DeleteId.Value);
         }
     }
     return(PartialView("UserList", model));
 }
コード例 #29
0
        public ActionResult View(int accountId)
        {
            var users = this.userService.GetUserList(accountId);
            var model = new UserListModel
            {
                AccountId = accountId,
                Users     = users
            };

            return(this.View(model));
        }
コード例 #30
0
 public ViewResult List(UserListModel model)
 {
     if (ModelState.IsValid)
     {
         if (model.DeleteId.HasValue)
         {
             UserModel.Delete(model.DeleteId.Value);
         }
     }
     return(View(model));
 }
コード例 #31
0
 public UsersPage()
 {
     InitializeComponent();
     Model = new UserListModel();
 }