コード例 #1
0
        public IResult Login(string userName, string password )
        {
            //LoadDataDetail<Server.Services.Authorization.User> authorizationResult = new LoadDataDetail<User>(DomainContext, DomainContext.LoginQuery(userName, password, true, null), (sender) => { TmpUser = sender.Result; });
            DomainContext.AuthResults.Clear();
            LoadDataDetail<AuthResult> authorizationResult = new LoadDataDetail<AuthResult>(DomainContext,DomainContext.LoginQuery(userName, password, true, null), (sender) => 
            {
                if (sender.Result != null)
                {
                    IsAuthorize = sender.Result.IsAuthenticated;
                    Message = sender.Result.Message;
                    ChangePassword = sender.Result.ChangePassword;
                }
                else
                {
                    Message = "Nastala neocakávaná chyba skuste sa prihlásiť ešte raz.";
                    IsAuthorize = false;
                }

            });
            return authorizationResult;
        }
コード例 #2
0
 /// <summary>
 /// Gets the detail.
 /// </summary>
 public void GetData()
 {
     LoadDataDetail<Element> groupResult = new LoadDataDetail<Element>(_elementDomainContext, _elementDomainContext.GetElementDetailQuery(Id), (sender) =>
     {
         Element = sender.Result;
         //Group.LoadPo(_groupEntity);
         this.NotifyOfPropertyChange(() => this.Element);
         //((PermissionAssigmentViewModel)Items[0]).LoadData();
     });
     Coroutine.BeginExecuteFor(groupResult, this);
 }
コード例 #3
0
        private void GetData()
        {
            EntityQuery<ModuleDto> Query;
            if (Id != 0)
                Query = _moduleDomainContext.GetModuleDetailQuery(Id);
            else if (ModuleDto != null && !string.IsNullOrEmpty(ModuleDto.FileName) && xapFile != null && xapFile.Count() > 0)
            {
                Query = _moduleDomainContext.GetModuleDetailByFileNameQuery(ModuleDto.FileName);
            }
            else
            {
                ModuleDto = new ModuleDto();
                return;
            }
            LoadDataDetail<ModuleDto> groupResult = new LoadDataDetail<ModuleDto>(_moduleDomainContext, Query, (sender) =>
            {
                if (xapFile != null && xapFile.Count() > 0 && sender.Result == null)
                {
                    IsNewDeploy = true;
                    IsUpdateDeploy = false;
                    


                }
                if (xapFile != null && xapFile.Count() > 0 && sender.Result != null)
                {
                    IsUpdateDeploy = true;
                    IsNewDeploy = false;
                    ModuleDtoEntity = sender.Result;
                }

                if (xapFile == null || xapFile.Count() == 0)
                {
                    IsUpdateDeploy = false;
                    IsNewDeploy = false;
                    ModuleDto = sender.Result;
                }
                this.NotifyOfPropertyChange(() => this.ModuleDto);

            });
            Coroutine.BeginExecuteFor(groupResult, this);

        }