public JobApplicationComponent(Application_ a1) { InitializeComponent(); lblApplicationId.Text = applicationId.ToString(); lblJobOfferName.Text = a1.JobOffer.Title; lbljobOfferDescription.Text = a1.JobOffer.Description; lblJobOfferCategory.Text = a1.JobOffer.Category.Name; // lblJobSeekerName.Text = "Job Seeker: " + a1.JobSeeker.Name + " " + a1.JobSeeker.LastName; lblStatusApplication.Text = "Status: " + a1.Status.ToString(); lblGenderJobSeeker.Text = "Gender: " + a1.JobSeeker.Gender.ToString(); }
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864 public void ConfigureAuth(IAppBuilder app) { // Enable the application to use a cookie to store information for the signed in user app.UseCookieAuthentication(new CookieAuthenticationOptions { AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, LoginPath = new PathString("/Account/Login") }); MembershipPlusServiceProxy svc = new MembershipPlusServiceProxy(); if (ClientContext == null) { ClientContext = svc.SignInService(new CallContext(), null); } CallContext cctx = ClientContext.CreateCopy(); // Get encryption and decryption key information from the configuration Configuration cfg = WebConfigurationManager.OpenWebConfiguration(System.Web.Hosting.HostingEnvironment.ApplicationVirtualPath); var machineKey = (MachineKeySection)cfg.GetSection("system.web/machineKey"); if (machineKey.ValidationKey.Contains("AutoGenerate")) { throw new Exception("Hashed or Encrypted passwords " + "are not supported with auto-generated keys."); } string ApplicationName = ConfigurationManager.AppSettings["ApplicationName"]; try { cctx.DirectDataAccess = true; Application_ServiceProxy apprepo = new Application_ServiceProxy(); List <Application_> apps = apprepo.LoadEntityByNature(cctx, ApplicationName); if (apps == null || apps.Count == 0) { cctx.OverrideExisting = true; var tuple = apprepo.AddOrUpdateEntities(cctx, new Application_Set(), new Application_[] { new Application_ { Name = ApplicationName } }); App = tuple.ChangedEntities.Length == 1 && IsValidUpdate(tuple.ChangedEntities[0].OpStatus) ? tuple.ChangedEntities[0].UpdatedItem : null; cctx.OverrideExisting = false; } else { App = apps[0]; } MemberInitSuccess = true; } catch { } }
public UserManagerEx(IUserStore <TUser> store, CallContext clientContext, Application_ app) : this(store) { this.app = app; _cctx = clientContext; }
public RoleStore(CallContext clientContext, Application_ app) { _cctx = clientContext; this.app = app; }