コード例 #1
0
        public UserProfile GetProfileId(HttpContext httpcontext, CandidatesContext db)
        {
            var  userId = this.GetCurrentUser(httpcontext);
            long UserId, ProfileId;

            if (userId <= 0)
            {
                UserId = 0;
            }
            else
            {
                UserId = userId;
            }

            var user = db.Users.Where(x => x.Id == userId).SingleOrDefault();

            if (user.ProfileRuningId <= 0 || user.ProfileRuningId == null)
            {
                ProfileId = 0;
            }
            else
            {
                ProfileId = (long)user.ProfileRuningId;
            }

            UserProfile UP = new UserProfile()
            {
                ProfileId = ProfileId,
                UserId    = UserId
            };

            return(UP);
        }
コード例 #2
0
 public OfficesController(CandidatesContext context)
 {
     this.db = context;
     help    = new Helper();
 }
 public ConstituencyDetailsController(CandidatesContext context)
 {
     db = context;
 }
コード例 #4
0
 public AccountService(CandidatesContext context)
 {
     _context = context;
 }
コード例 #5
0
 public ProfileController(CandidatesContext context)
 {
     this.db = context;
     help    = new Helper();
 }
コード例 #6
0
 public CandidatesSQLController(CandidatesContext context)
 {
     _context = context;
 }
 public ConstituenciesController(CandidatesContext context)
 {
     this.db = context;
     help    = new Helper();
 }
コード例 #8
0
 public CandidatesController(CandidatesContext context)
 {
     db   = context;
     help = new Helper();
 }
コード例 #9
0
 public HighSchoolService(CandidatesContext context)
 {
     _context = context;
 }
 public EndorsementsController(CandidatesContext context)
 {
     db   = context;
     help = new Helper();
 }
コード例 #11
0
 public SkillService(CandidatesContext context)
 {
     _context = context;
 }
 public RepresentativesController(CandidatesContext context)
 {
     db   = context;
     help = new Helper();
 }
コード例 #13
0
 public CandidateLanguageService(CandidatesContext context)
 {
     _context = context;
 }
コード例 #14
0
 public SecurityController(CandidatesContext context, IConfiguration configuration)
 {
     this.db       = context;
     help          = new Helper();
     Configuration = configuration;
 }
 public ConstituencyDetailsController(CandidatesContext context)
 {
     db   = context;
     help = new Helper();
 }
コード例 #16
0
 public OptionsService(CandidatesContext context)
 {
     _context = context;
 }