Beispiel #1
0
        public override bool IsValid(object value)
        {
            try
            {
                VoteExplorerContext Context     = new VoteExplorerContext();
                List <SHOAccount>   shoaccounts = Context.shoaccounts.AsQueryable().ToList();

                return(shoaccounts.Any(u => u.ControlNumber == (string)value));
            }
            catch
            {
                return(false);
            }
        }
        public override bool IsValid(object value)
        {
            try
            {
                VoteExplorerContext Context     = new VoteExplorerContext();
                List <IVYAccount>   ivyaccounts = Context.ivyaccounts.AsQueryable().ToList();

                return(ivyaccounts.Any(u => u.userName == (string)value));
            }
            catch
            {
                return(false);
            }
        }
        public override bool IsValid(object value)
        {
            try
            {
                VoteExplorerContext Context     = new VoteExplorerContext();
                List <IVYAccount>   ivyaccounts = Context.ivyaccounts.AsQueryable().Where(ivy => ivy.userName == _userName).ToList();

                if (ivyaccounts.Any())
                {
                    return(ivyaccounts.Any(a => a.passWord == value.ToString()));
                }
                else
                {
                    return(false);
                }

                return(ivyaccounts.Any(u => u.userName == (string)value));
            }
            catch
            {
                return(false);
            }
        }
Beispiel #4
0
 public GroupService(VoteExplorerContext context)
 {
     this.Context = context;
 }