// constructor public DocExtractor() { SiteUrl = ""; WebName = ""; LibTitle = ""; UserSelection = FilterUser.AllUsers; // be default UserDisplayName = ""; UserLoginName = ""; // populate file types DocTypes = new List <string>(); DocTypes.Add("All Types"); DocTypes.Add("MS Office: .docx, .xlsx, .pptx"); DocTypes.Add("Adobe .pdf"); DocTypes.Add("Images: .jpg, .bmp, .png"); DocTypes.Add("Videos: .wmv, .mpg, .avi, .mp4"); DocTypes.Add("Audio: .mp3, .wav, .wma"); DocTypes.Add("Web: .htm, .aspx, .xml"); DocTypes.Add("Custom"); //allow user to specify custom extension such as .txt CusDocType = ""; // the custom value DocSize = 0; DocBeginDate = System.DateTime.Now; DocEndDate = System.DateTime.Now; TextinName = ""; }
// constructor public DocExtractor() { SiteUrl = ""; WebName = ""; LibTitle = ""; UserSelection = FilterUser.AllUsers; // be default UserDisplayName = ""; UserLoginName = ""; // populate file types DocTypes = new List<string>(); DocTypes.Add("All Types"); DocTypes.Add("MS Office: .docx, .xlsx, .pptx"); DocTypes.Add("Adobe .pdf"); DocTypes.Add("Images: .jpg, .bmp, .png"); DocTypes.Add("Videos: .wmv, .mpg, .avi, .mp4"); DocTypes.Add("Audio: .mp3, .wav, .wma"); DocTypes.Add("Web: .htm, .aspx, .xml"); DocTypes.Add("Custom");//allow user to specify custom extension such as .txt CusDocType = "";// the custom value DocSize = 0; DocBeginDate = System.DateTime.Now; DocEndDate = System.DateTime.Now; TextinName = ""; }
public dynamic filterUser(FilterUser filterUser) { var startday = DateTime.ParseExact(filterUser.startday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var endday = DateTime.ParseExact(filterUser.endday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var data = from user in context.Users join file in context.Files on user.usid equals file.usid where file.cbid == filterUser.cbid && user.ngaydenchibo >= startday && user.ngaydenchibo <= endday select new { user, file }; if (filterUser.gender != -1) { data = data.Where(m => m.file.gioitinh == (filterUser.gender == 1 ? true : false)); } if (filterUser.tongiao != "Tất cả tôn giáo") { data = data.Where(m => m.file.tongiao == filterUser.tongiao); } if (filterUser.lyluanct != -1) { data = data.Where(m => m.file.lyluanct == filterUser.lyluanct); } if (filterUser.bangcap != -1) { data = data.Where(m => m.file.bangcap == filterUser.bangcap); } if (filterUser.chucvu != -1) { data = data.Where(m => m.file.titleid == filterUser.chucvu); } if (filterUser.phongban != -1) { data = data.Where(m => m.file.donvi == filterUser.phongban); } if (filterUser.chuyendang != -1) { switch (filterUser.chuyendang) { case 0: break; case 1: break; } } return(data); }
public ActionResult FilterUser() { var newUser = new FilterUser { MinRegisterDate = DateTime.Parse("01.01.2020 00:00:00"), MaxRegisterDate = DateTime.Now, Role = UserRoles.All }; ViewBag.AvailableRoles = General.RolesForFilter.Select(x => new SelectListItem { Value = x.ToString(), Text = General.RolesShownNames[x] }).ToList(); return(View(newUser)); }
public PartialViewResult CancellationCategorized(FilterUser userFilter) { return(PartialView( "~/Views/CallCenter/_HistoryCancel.cshtml", new HistoryCancellationPartialViewModel( new Cancellations( new SqlConnection(ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString) ), new Users( new SqlConnection(ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString) ) ).Execute() )); }
/// <summary> /// 获取用户列表 /// </summary> /// <returns></returns> public JsonResult GetUsers(string filter) { JavaScriptSerializer serializer = new JavaScriptSerializer(); FilterUser model = serializer.Deserialize <FilterUser>(filter); int totalCount = 0; int pageCount = 0; var list = OrganizationBusiness.GetUsers(model.Keywords, model.DepartID, model.RoleID, CurrentUser.AgentID, PageSize, model.PageIndex, ref totalCount, ref pageCount); JsonDictionary.Add("items", list); return(new JsonResult() { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
public DataRespond getUserToaBroad(FilterUser filter) { DataRespond data = new DataRespond(); try { data.success = true; data.message = "success"; data.data = m_statisticalResponsitory.getUserToaBroad(filter); } catch (Exception e) { data.success = false; data.message = e.Message; data.error = e; } return(data); }
public dynamic getUserMoved(FilterUser filterUser) { try { DateTime startday = DateTime.ParseExact(filterUser.startday, "dd/MM/yyyy", CultureInfo.InvariantCulture); DateTime endday = DateTime.ParseExact(filterUser.endday, "dd/MM/yyyy", CultureInfo.InvariantCulture); if (filterUser.type == 0)//chuyen di { var data = from user in context.Users.Where(m => m.active == false) join usermove in context.UserMove on user.usid equals usermove.usid where usermove.createday >= startday && usermove.createday <= endday join file in context.Files on user.usid equals file.usid where file.cbid == filterUser.cbid select new { user, file, usermove }; return(data); } else { var data = from user in context.Users join file in context.Files on user.usid equals file.usid where user.ngaydenchibo >= startday && user.ngaydenchibo <= endday && file.cbid == filterUser.cbid select new { user, file }; return(data); } } catch (Exception e) { return(e); } }
public ActionResult ShowFilteredUsers(FilterUser filterUser) { if (!ModelState.IsValid) { MessageForClient(ActionStatus.Error, $"Указанные данные не валидны."); return(View("~/Views/Home/Index.cshtml")); } var registerDates = new Dictionary <string, DateTime> { ["min"] = filterUser.MinRegisterDate, ["max"] = filterUser.MaxRegisterDate }; var repositoryResult = _userRepository.FilterUsers(_mapper.Map <FilterUser, UserBase>(filterUser), registerDates); if (repositoryResult.Status != ActionStatus.Success) { MessageForClient(repositoryResult.Status, repositoryResult.Message); return(RedirectToAction("FilterUser", "User")); } var showUsers = repositoryResult.Entity.Select(x => _mapper.Map <UserBase, ShowUser>(x as UserBase)).ToList(); return(PartialView("~/Views/User/ShowListUsers.cshtml", showUsers)); }
public PartialViewResult HistoryShowCancellation(FilterUser filterUser) { return(PartialView( "~/Views/CallCenter/_HistoryCancel.cshtml", new HistoryCancellationViewModel( new CancellationData( new SqlConnection( ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString ), new CancellationFileter( filterUser ) ), new Users( new SqlConnection( ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString ) ) ).Execute() )); }
public PartialViewResult HistoryShow(FilterUser filterUser) { return(PartialView( "~/Views/CallCenter/_HistoryOrder.cshtml", new HistoryOrderViewModel( new OrderData( new SqlConnection( ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString ), new OrderApllication( filterUser ).Execute() ), new Users( new SqlConnection( ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString ) ) ).Execute() )); }
public List <AppUser> GetUserInActive(FilterUser filter, string column, bool isDesc) { var model = _appUserRepository.GetAll(new string[] { CommonConstants.UserGroup }).Where(x => x.Status == false); if (filter != null) { if (filter.GroupID.Count() != 0) { model = model.Where(x => filter.GroupID.Contains(x.GroupId.ToString())); } if (filter.UserID.Count() != 0) { model = model.Where(x => filter.UserID.Contains(x.Id)); } } if (column != null) { return(model.OrderByField(column, isDesc).ToList()); } return(model.ToList()); }
public List <AppUser> GetAllUserFilter(FilterUser filter, string column, bool isDesc) { var model = _appUserRepository.GetAll(new string[] { CommonConstants.UserGroup }); if (filter != null) { if (filter.GroupID.Count() != 0) { model = model.Where(x => filter.GroupID.Contains(x.GroupId.ToString())); } if (filter.UserID.Count() != 0) { model = model.Where(x => filter.UserID.Contains(x.Id)); } //if (filter.Active[0]) //{ //} if (filter.Active.Count() != 0) { switch (filter.Active.Count()) { case 1: model = model.Where(x => x.Status == filter.Active[0]); break; //default: } //for (int i = 0; i < filter.Active.Count(); i++) //{ // model = model.Where(x => x.Status == filter.Active[i]); //} } } if (column != null) { return(model.OrderByField(column, isDesc).ToList()); } return(model.ToList()); }
public dynamic getUserToaBroad(FilterUser filterUser) { var startday = DateTime.ParseExact(filterUser.startday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var endday = DateTime.ParseExact(filterUser.endday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var data = from user in context.Users where user.cbid == filterUser.cbid join file in context.Files on user.usid equals file.usid join abr in context.Toabroad on file.fileid equals abr.fileid select new { user.madv, file.hotendangdung, file.hotenkhaisinh, file.avatar, abr.lydo, abr.thoigiandi }; return(data); }
public List <AppUser> GetUserOnSite(FilterUser filter, string column, bool isDesc) { var lstUserOnsite = _userOnsiteRepository.GetAll().Select(x => x.UserID).Distinct(); var model = _appUserRepository.GetMulti(x => lstUserOnsite.Contains(x.Id)); if (filter != null) { if (filter.GroupID.Count() != 0) { model = model.Where(x => filter.GroupID.Contains(x.GroupId.ToString())); } if (filter.UserID.Count() != 0) { model = model.Where(x => filter.UserID.Contains(x.Id)); } } if (column != null) { return(model.OrderByField(column, isDesc).ToList()); } return(model.ToList()); }
public PartialViewResult HistoryShowDamage(FilterUser filterUser) { return (PartialView( "~/Views/CallCenter/_HistoryDamage.cshtml", new HistoryDamageViewModel( new DamageData( new SqlConnection( ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString), new FilterDamageResult( filterUser, new DateFrom() ) ), new Users( new SqlConnection( ConfigurationManager.ConnectionStrings["DataConnect"].ConnectionString ) ) ).Execute() )); }
public dynamic getUserByDesCr(FilterUser filterUser) { var startday = DateTime.ParseExact(filterUser.startday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var endday = DateTime.ParseExact(filterUser.endday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var data = from user in context.Users join file in context.Files on user.usid equals file.usid join des in context.Discipline on file.fileid equals des.fileid where file.cbid == filterUser.cbid select new { user.madv, file.hotendangdung, file.hotenkhaisinh, file.avatar, des.noidung, des.daycreate }; return(data); }
public ActionResult ListOfUsers(FilterUser model) { //ViewBag.Students = db.Users; if (model.SelectedId == null || model.SelectedId == 0) { query = from listGroup in db.Groups from list in db.Users select new ListOfUsers() { UserName = list.UserName, Password = list.PasswordTxt }; } else { query = from list in db.Users .Where(x => (x.GroupId == model.SelectedId)) select new ListOfUsers() { UserName = list.UserName, Password = list.PasswordTxt }; } List <Group> group = db.Groups.ToList(); group.Insert(0, new Group { GroupId = 0, Name = "Всі" }); var data = new FilterUser { List = query.ToList(), Group = new SelectList(group, "GroupId", "Name") }; return(View(data)); }
public dynamic getUserByBonus(FilterUser filterUser) { var startday = DateTime.ParseExact(filterUser.startday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var endday = DateTime.ParseExact(filterUser.endday, "dd/MM/yyyy", CultureInfo.InvariantCulture); var data = from user in context.Users join file in context.Files on user.usid equals file.usid join bonus in context.Bonus on file.fileid equals bonus.fileid where file.cbid == filterUser.cbid && bonus.daycreate >= startday && bonus.daycreate <= endday select new { user.madv, file.hotendangdung, file.hotenkhaisinh, file.ngayvaodangct, file.avatar, bonus.daycreate, bonus.noidung }; return(data); }
public dynamic filterUser(FilterUser filterUser) { throw new NotImplementedException(); }
public async Task <HttpResponseMessage> GetListOnSitePaging(HttpRequestMessage request, string column, bool isDesc, int page, int pageSize, [FromBody] FilterUser filter) { return(await CreateHttpResponse(request, () => { HttpResponseMessage response = null; int totalRow = 0; var model = _userService.GetUserOnSite(filter, column, isDesc); foreach (var user in model) { //Loại user admin if (user.UserName.Equals(CommonConstants.AdminUsername)) { model.Remove(user); break; } } totalRow = model.Count(); IEnumerable <AppUserViewModel> modelVm = Mapper.Map <IEnumerable <AppUser>, IEnumerable <AppUserViewModel> >(model.Skip((page - 1) * pageSize).Take(pageSize)); PaginationSet <AppUserViewModel> pagedSet = new PaginationSet <AppUserViewModel>() { PageIndex = page, PageSize = pageSize, TotalRows = totalRow, Items = modelVm, }; response = request.CreateResponse(HttpStatusCode.OK, pagedSet); return response; })); }
public test(FilterUser _filterUser, DateFrom dateFrom) { _FilterUser = _filterUser; this.dateFrom = dateFrom; }
public NotClosedOrders(FilterUser _filterUser, DateFrom dateFrom) { _FilterUser = _filterUser; this.dateFrom = dateFrom; }
public DamageApllication(FilterUser filterUser, DamageData returnedDamageData) { this.filterUser = filterUser; this.returnedDamageData = returnedDamageData; }
/// <summary> /// Заполняет фильтры уникальными значениями свойств. /// </summary> public static void GetFilters() { // Очистить все фильтры. FilterOtv.Clear(); FilterNewOtv.Clear(); FilterUser.Clear(); FilterLocation.Clear(); FilterPodrazdelenie.Clear(); FilterTypeOs.Clear(); FilterSostoyanie.Clear(); FilterDate.Clear(); FilterOtdel.Clear(); FilterTypeInvNumn.Clear(); FilterStatusRec.Clear(); // Добавить во все фильтры пункты Все и Пустые значения. FilterOtv.Add("Все"); FilterOtv.Add("Пустые значения"); FilterNewOtv.Add("Все"); FilterNewOtv.Add("Пустые значения"); FilterUser.Add("Все"); FilterUser.Add("Пустые значения"); FilterLocation.Add("Все"); FilterLocation.Add("Пустые значения"); FilterPodrazdelenie.Add("Все"); FilterPodrazdelenie.Add("Пустые значения"); FilterTypeOs.Add("Все"); FilterTypeOs.Add("Пустые значения"); FilterSostoyanie.Add("Все"); FilterSostoyanie.Add("Пустые значения"); FilterDate.Add("Все"); FilterDate.Add("Пустые значения"); FilterOtdel.Add("Все"); FilterOtdel.Add("Пустые значения"); FilterStatusRec.Add("Все"); FilterStatusRec.Add("Пустые значения"); FilterTypeInvNumn.Add("Все"); foreach (object o in ForWorks.viewSource.View) { if (o is OS obj) { if (!FilterOtv.Contains(obj.Otvetstvenniy) && !string.IsNullOrWhiteSpace(obj.Otvetstvenniy)) { FilterOtv.Add(obj.Otvetstvenniy); } if (!FilterNewOtv.Contains(obj.NewOtv) && !string.IsNullOrWhiteSpace(obj.NewOtv)) { FilterNewOtv.Add(obj.NewOtv); } if (!FilterUser.Contains(obj.User) && !string.IsNullOrWhiteSpace(obj.User)) { FilterUser.Add(obj.User); } if (!FilterLocation.Contains(obj.Location) && !string.IsNullOrWhiteSpace(obj.Location)) { FilterLocation.Add(obj.Location); } if (!FilterPodrazdelenie.Contains(obj.Podrazdelenie) && !string.IsNullOrWhiteSpace(obj.Podrazdelenie)) { FilterPodrazdelenie.Add(obj.Podrazdelenie); } if (!FilterTypeOs.Contains(obj.TypeOs) && !string.IsNullOrWhiteSpace(obj.TypeOs)) { FilterTypeOs.Add(obj.TypeOs); } if (!FilterSostoyanie.Contains(obj.Sostoyanie) && !string.IsNullOrWhiteSpace(obj.Sostoyanie)) { FilterSostoyanie.Add(obj.Sostoyanie); } if (!FilterDate.Contains(obj.DatePostanovki) && !string.IsNullOrWhiteSpace(obj.DatePostanovki)) { FilterDate.Add(obj.DatePostanovki); } if (!FilterOtdel.Contains(obj.Otdel) && !string.IsNullOrWhiteSpace(obj.Otdel)) { FilterOtdel.Add(obj.Otdel); } if (!FilterStatusRec.Contains(obj.StatusRec) && !string.IsNullOrWhiteSpace(obj.StatusRec)) { FilterStatusRec.Add(obj.StatusRec); } if (obj.InvNum.StartsWith("29600") && !FilterTypeInvNumn.Contains("Деловые линии")) { FilterTypeInvNumn.Add("Деловые линии"); } if (obj.InvNum.StartsWith("296CC") && !FilterTypeInvNumn.Contains("КЦ")) { FilterTypeInvNumn.Add("КЦ"); } if (obj.InvNum.StartsWith("6000") && !FilterTypeInvNumn.Contains("ДЛ Транс")) { FilterTypeInvNumn.Add("ДЛ Транс"); } if (obj.InvNum.StartsWith("11100") && !FilterTypeInvNumn.Contains("Гет Карго")) { FilterTypeInvNumn.Add("Гет Карго"); } } } }