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); }
public OfficesController(CandidatesContext context) { this.db = context; help = new Helper(); }
public ConstituencyDetailsController(CandidatesContext context) { db = context; }
public AccountService(CandidatesContext context) { _context = context; }
public ProfileController(CandidatesContext context) { this.db = context; help = new Helper(); }
public CandidatesSQLController(CandidatesContext context) { _context = context; }
public ConstituenciesController(CandidatesContext context) { this.db = context; help = new Helper(); }
public CandidatesController(CandidatesContext context) { db = context; help = new Helper(); }
public HighSchoolService(CandidatesContext context) { _context = context; }
public EndorsementsController(CandidatesContext context) { db = context; help = new Helper(); }
public SkillService(CandidatesContext context) { _context = context; }
public RepresentativesController(CandidatesContext context) { db = context; help = new Helper(); }
public CandidateLanguageService(CandidatesContext context) { _context = context; }
public SecurityController(CandidatesContext context, IConfiguration configuration) { this.db = context; help = new Helper(); Configuration = configuration; }
public ConstituencyDetailsController(CandidatesContext context) { db = context; help = new Helper(); }
public OptionsService(CandidatesContext context) { _context = context; }