public AuthorizationFormPresenter(IAuthorizationForm authorizationForm, UserListModel model, IMessageBoxService messageService) { this.authorizationForm = authorizationForm; this.model = model; this.messageService = messageService; this.authorizationForm.LogIn += AuthorizationForm_LogIn; }
public async Task LoginCurrentUserAsync(UserListModel user) { accessTokenManager.Logout(); applicationContext.ClearLoginInfo(); dataStorageService.ClearSessionPersistance(); await GoToLoginPageAsync(); }
public string userList(int page, int rows) { UserListModel ulm = new UserListModel(page, rows); string json = JsonConvert.SerializeObject(ulm); return(json); }
public RegistrationFormPresenter(IRegistrationForm registrationForm, UserListModel model, IMessageBoxService messageService) { this.registrationForm = registrationForm; this.model = model; this.messageService = messageService; this.registrationForm.Register += RegistrationForm_Register; }
public virtual ActionResult UserList() { var um = new UserListModel { UserTable = _iUserServices.GetAllUser() }; return(View("~/Views/User/UserList.cshtml", um)); }
public virtual ActionResult User() { UserListModel model = new UserListModel(); model.Sections = GetSections(); model.Active = _active.GetActiveList(); return(View(model)); }
public ActionResult Index() { UserListModel model = new UserListModel(); model.Users = _userService.GetAll(); return(View(model)); }
public IActionResult UserList() { var userListModel = new UserListModel(); userListModel.Batsman = UserService.GetBatsman(); userListModel.Bowler = UserService.GetBowlers(); return(View(userListModel)); }
public IActionResult AddUserToRole(UserListModel model) { _dataService.AddUser(new UserRole { RoleId = HttpContext.Session.GetString("roleId"), UserId = model.UserId }); return(View("CloseCurrentView")); }
public IActionResult Index() { var model = new UserListModel(); model.Users = TestUsers.Users; // TODO - add wrapper for this collection... return(View(model)); }
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)); }
public ActionResult UserList() { var m = UserListModel.Get(); ViewBag.Title = @Piranha.Resources.Settings.ListTitleUsers; return(View(@"~/Areas/Manager/Views/Settings/UserList.cshtml", m)); }
/// <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); }
public ActionResult List(UserFilter filter) { var model = new UserListModel { Items = userRepository.Find(filter) }; return(View(model)); }
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); }
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); }
public static UserListModel Save(UserListModel obj) { using (SchoolDataContext dbcontext = new SchoolDataContext()) { // //dbcontext.User.Add(obj); dbcontext.SaveChanges(); } return(obj); }
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); }
/// <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)); }
// -> Exception private void RunGolangAndReadFile() { CreateTempFile(); String input = RunGolang("-r"); String decrypted = ReadTempFile(); UserList = JsonConvert.DeserializeObject <UserListModel>(decrypted); DeleteTempFile(); }
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 }); }
protected virtual ActiveMemberSearchQuery GetActiveMemberSearchQuery(UserListModel model) { var activeUserSearchRequest = new ActiveMemberSearchQuery { Text = string.Empty, Skip = 0, Take = model.DisplayedAmount }; return(activeUserSearchRequest); }
public ActionResult List(int accountId) { IList <UserInfo> userInfos = this.userService.GetUserList(); UserListModel model = new UserListModel() { AccountId = accountId, Users = userInfos }; return(this.View(model)); }
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)); }
/// <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); }
public static User MapListModelToEntity(UserListModel listModel) { return(new User { Id = listModel.Id, Name = listModel.Name, Email = listModel.Email, Password = listModel.Password, LastLoginTime = listModel.LastLoginTime }); }
public static UserDetailModel ListToDetailModel(UserListModel userListModel) { return(new UserDetailModel { Id = userListModel.Id, Name = userListModel.Name, Email = userListModel.Email, Password = userListModel.Password, LastLoginTime = userListModel.LastLoginTime }); }
public PartialViewResult ListAjax(UserListModel model) { if (ModelState.IsValid) { if (model.DeleteId.HasValue) { UserModel.Delete(model.DeleteId.Value); } } return(PartialView("UserList", model)); }
public ActionResult View(int accountId) { var users = this.userService.GetUserList(accountId); var model = new UserListModel { AccountId = accountId, Users = users }; return(this.View(model)); }
public ViewResult List(UserListModel model) { if (ModelState.IsValid) { if (model.DeleteId.HasValue) { UserModel.Delete(model.DeleteId.Value); } } return(View(model)); }
public UsersPage() { InitializeComponent(); Model = new UserListModel(); }