Example #1
0
        private void InitView()
        {
            _appList = _nsiService.Applications;
            _appList.Add(AppEntity.Create());

            _orgList = _nsiService.Organizations;
            _orgList.Add(OrgEntity.Create());

            _userList = _nsiService.Users;
            _userList.Add(UserEntity.Create());

            _tagList = _nsiService.Tags;

            _dialogResult = null;
            _control      = new RequestFilterControl(this);

            _caption = string.Format("Параметри пошуку звернень", "");
            _hint    = string.Format("Параметри пошуку звернень", "");

            _image = Properties.Resources.Request;

            _filterList = new List <RequestListFilterEntity>();
            foreach (RequestListFilterEntity filter in _mainController.Filters)
            {
                _filterList.Add(filter.Clone());
            }
            if (_filterOrigin == null)
            {
                Filter = RequestListFilterEntity.Create();
            }
            else
            {
                Filter = _filterOrigin.Clone();
            }
        }
Example #2
0
        RequestListFilterEntity SettingToFilter(FilterEntitySetting setting)
        {
            RequestListFilterEntity filter = RequestListFilterEntity.Create();

            filter.CloneKey      = new IdentKey(setting.CloneKey);
            filter.FilterName    = setting.FilterName;
            filter.StartDateTime = setting.StartDateTime;
            filter.StopDateTime  = setting.StopDateTime;

            UserEntity user = _nsiService.GetUserById(setting.ResponseId);

            filter.ResponseUser = user == null?UserEntity.Create() : user;

            user = _nsiService.GetUserById(setting.CreatorId);
            filter.CreatorUser = user == null?UserEntity.Create() : user;

            AppEntity app = _nsiService.GetAppById(setting.ApplicationId);

            filter.Application = app == null?AppEntity.Create() : app;

            OrgEntity org = _nsiService.GetOrgById(setting.OrganizationId);

            filter.Organization = org == null?OrgEntity.Create() : org;

            filter.Comments     = setting.Comments;
            filter.Subject      = setting.Subject;
            filter.Contact      = setting.Contact;
            filter.TagIdList    = setting.TagIdList;
            filter.StatusIdList = setting.StatusIdList;

            return(filter);
        }