public ServiceContract() { userDAL = (IUserDAL)ContextRegistry.GetContext().GetObject("UserDAL"); orderDAL = (IOrderDAL)ContextRegistry.GetContext().GetObject("OrderDAL"); orderItemDAL = (IOrderItemDAL)ContextRegistry.GetContext().GetObject("OrderItemDAL"); productDAL = (IProductDAL)ContextRegistry.GetContext().GetObject("ProductDAL"); }
/// <summary> /// Constructor that injects all the dependencies for the account controller. /// </summary> /// <param name="authProvider"></param> /// <param name="userDal"></param> /// <param name="checkinDal"></param> /// <param name="badgeDal"></param> public AccountController(IAuthProvider authProvider, IUserDAL userDal, ICheckinSqlDAL checkinDal, IBadgeSqlDAL badgeDal) { this.authProvider = authProvider; this.userDal = userDal; this.checkinDal = checkinDal; this.badgeDal = badgeDal; }
//methods to use it public void MyMethod() { IUserDAL userDAL = (IUserDAL)Activator.CreateInstance(_myUserDALType); //Call method in IUserDAL userDAL.CreateUser(); }
public ActionResult Autherize(UserViewModel userModel) { userDAL = new UserDALImpl(); var userDetails = userDAL.getUser(userModel.UserName, userModel.Password); if (userDetails == null) { userModel.LoginErrorMessage = "Nombre de Usuario o Contraseña Incorrectos"; return(View("Index", userModel)); } else { //Against AD //http://www.benramey.com/2014/10/20/active-directory-authentication-in-asp-net-mvc-5-with-forms-authentication-and-group-based-authorization/ //http://www.beansoftware.com/ASP.NET-Tutorials/Forms-Authentication-Active-Directory.aspx Session["userID"] = userDetails.UserId; Session["userName"] = userDetails.UserName; var authTicket = new FormsAuthenticationTicket(userDetails.UserName, true, 100000); var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(authTicket)); Response.Cookies.Add(cookie); var name = User.Identity.Name; // line 4 return(RedirectToAction("Index", "Home")); } }
public ActionResult Autherize(UsuarioViewModel userModel) { string check = Encrypt.GetSha256(userModel.Clave); userDAL = new UserDALImpl(); var userDetails = userDAL.getUser(userModel.NombreUsuario, userModel.Clave = check.Trim()); if (userDetails == null) { userModel.LoginErrorMessage = "Nombre de Usuario o Password Incorrectos"; return(View("Index", userModel)); } else { Session["Usuario_ID"] = userDetails.Usuario_ID; Session["NombreUsuario"] = userDetails.NombreUsuario; var authTicket = new FormsAuthenticationTicket(userDetails.NombreUsuario, true, 100000); var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(authTicket)); Response.Cookies.Add(cookie); var name = User.Identity.Name; return(RedirectToAction("Index", "Home")); } }
public DashboardController(IAuthProvider authProvider, IUserFoodDAL dal, IWeightDAL weightDal, IUserDAL userDal) { this.authProvider = authProvider; this.dal = dal; this.weightDal = weightDal; this.userDal = userDal; }
public UserDALManageFacade() { _userDALProvider = new UserDAL(); _imageDALProvider = new ImgStorageDAL(); _userroleDALProvider = new UserRoleDAL(); _roleDALProvider = new RoleDAL(); }
public ReservationController(IAuthProvider authProvider, IPetDAO petDAO, IUserDAL userDAL, IReservationDAO reservationDAO) { this.authProvider = authProvider; this.petDAO = petDAO; this.userDAL = userDAL; this.reservationDAO = reservationDAO; }
public GymController(IAuthProvider authProvider, IGymDAL gymDAL, IMemberDAL memberDAL, IUserDAL userDAL) { this.authProvider = authProvider; this.gymDAL = gymDAL; this.memberDAL = memberDAL; this.userDAL = userDAL; }
public ActionResult Authorize(UsuarioViewModel usuarioViewModel) { usuarioViewModel.usuario = Request["usuario"]; usuarioViewModel.contrasenia = Request["contrasenia"]; userDAL = new UserDALImpl(); var userDetails = userDAL.getUser(usuarioViewModel.usuario, usuarioViewModel.contrasenia); if (userDetails == null) { Response.Write("Nombre de Usuario o Contraseña Incorrectos"); //string script = "<script type='text/javascript'>alert('Nombre de Usuario o Password Incorrectos');</script>"; //usuarioViewModel.LoginErrorMessage = "Nombre de Usuario o Password Incorrectos"; return(View("Index", usuarioViewModel)); } else { Session["userID"] = userDetails.idUsuario; Session["userName"] = userDetails.usuario; var authTicket = new FormsAuthenticationTicket(userDetails.usuario, true, 100000); var cookie = new HttpCookie(FormsAuthentication.FormsCookieName, FormsAuthentication.Encrypt(authTicket)); Response.Cookies.Add(cookie); var name = User.Identity.Name; // line 4 return(RedirectToAction("Index", "Home")); } }
public BrewerController(IBeerDAL beerDAL, IBreweryDAL breweryDAL, IUserDAL userDAL, IBeerRatingDAL beerRatingDAL) { this.beerDAL = beerDAL; this.breweryDAL = breweryDAL; this.userDAL = userDAL; this.beerRatingDAL = beerRatingDAL; }
public AccountController(IAuthProvider authProvider, IUserDAL userDAO, IProfileDAL profileDAO, IProfileSearchDAL profileSearchDAL) { this.authProvider = authProvider; this.userDAO = userDAO; this.profileDAO = profileDAO; this.profileSearchDAL = profileSearchDAL; }
public PlanTripController(IUserDAL userDAL, ILandmarkDAL landmarkDAL, ITripDAL tripDAL) : base(userDAL) { this.userDAL = userDAL; this.landmarkDAL = landmarkDAL; this.tripDAL = tripDAL; }
public ClassesController(IUserDAL userDAL, IAuthProvider authProvider, IWorkoutDAL workoutDAL, IClassesDAL classDAL) { this.userDAL = userDAL; this.authProvider = authProvider; this.workoutDAL = workoutDAL; this.classDAL = classDAL; }
//Alle dependecies injecteren via deze constructor. public UserContainer(IUserContainerDAL dAL, IUserDAL userdal, IBetDAL betDAL) { this._containerDAL = dAL; this._userdal = userdal; this._betDAL = betDAL; Users = this.GetAllUsers(); }
public UserBLL([DIPParameterShortName("mysql")] IUserDAL iuserDAL, IServiceA serviceA, [DIPParameterConstant] string name, [DIPParameterConstant] int value) { _iuserDAL = iuserDAL; _serviceA = serviceA; Name = name; Value = value; }
public UserBLL(IUserDAL userDAL, UserValidation userValidation, IMapper mapper) : base(userDAL) { _userDAL = userDAL; _userValidation = userValidation; _mapper = mapper; }
public ComicBookController(ICollectionDAL collectionDAL, IStatisticsDAL statisticsDAL, IComicDAL comicDAL, IUserDAL userDAL) { this.collectionDAL = collectionDAL; this.statisticsDAL = statisticsDAL; this.comicDAL = comicDAL; this.userDAL = userDAL; }
public ProfileController(IProfileSearchDAL profileSearchDAL, IUserDAL userDAL, IAuthProvider authProvider, IProfileDAL profileDAL) { this.profileSearchDAL = profileSearchDAL; this.userDAL = userDAL; this.authProvider = authProvider; this.profileDAL = profileDAL; }
public AdminController(IAuthProvider authProvider, TeamSqlDAL teamDAL, IUserDAL userDAL, MessagesDAL messageDAL) { this.authProvider = authProvider; this.teamDAL = teamDAL; this.userDAL = userDAL; this.messageDAL = messageDAL; }
public HomeController(IRecipeDAL recipeDAL, IUserDAL userDal, IRecipeIngredientDAL recipeIngredientDAL, IIngredientDAL ingredientDAL, IPreparationStepsDAL preparationStepsDAL) { this.recipeDAL = recipeDAL; this.userDAL = userDal; this.recipeIngredientDAL = recipeIngredientDAL; this.ingredientDAL = ingredientDAL; this.preparationStepsDAL = preparationStepsDAL; }
public UserLogic(IUserDAL DAL) { if (DAL == null) { throw new ArgumentNullException("DAL as parametr is null"); } dal = DAL; }
static void Main(string[] args) { Console.WriteLine("Hello World!"); MyContainer container = new MyContainer(); container.Register <IUserDAL, UserDAL>(); IUserDAL userDal = container.Resolve <IUserDAL>(); }
public HomeController(IAuthProvider authProvider, IBeerDAL beerDAL, IBreweryDAL breweryDAL, IBeerReviewDAL beerReviewDAL, IUserDAL userDAL) { this.AuthProvider = authProvider; BeerDAL = beerDAL; BreweryDAL = breweryDAL; BeerReviewDAL = beerReviewDAL; UserDAL = userDAL; }
public PurchaseController(IReservationDAO resParam, IFilmDAO filmParam, IShowTimeDAO stParam, IAuthProvider authProvider, IUserDAL userDAO) { this.ResDAO = resParam; this.FilmDAO = filmParam; this.ShowTimeDAO = stParam; this.authProvider = authProvider; this.userDAO = userDAO; }
public AccountController(IAuthProvider authProvider, IUserDAL userDAL, IBeerDAL beerDAL, IBreweryDAL breweryDAL, IBeerReviewDAL beerReviewDAL) { this.AuthProvider = authProvider; this.UserDAL = userDAL; this.BeerDAL = beerDAL; this.BreweryDAL = breweryDAL; this.BeerReviewDAL = beerReviewDAL; }
public User(string name, IUserDAL userdal, IBetDAL betdal) { this.Name = name; this._userDAL = userdal; this._betDal = betdal; this.UserRole = 2; this.Permissions = new List <string>(); this.CurrentBet = MakeBetObject(betdal.GetCurrentBet(this.Id)); }
public CampaignController(ICampaignDAL campaigndal, ICategoryDAL categorydal, IMakeDAL makedal, IProductModelDAL modeldal, IProductDAL productdal, IUserDAL userdal) { CampaignDAL = campaigndal; CategoryDAL = categorydal; MakeDAL = makedal; ModelDAL = modeldal; ProductDAL = productdal; UserDAL = userdal; }
public GymController(IEquipmentDAL equipmentDAL, IWorkoutDAL workoutDAL, IVisitDAL visitDAL, IAuthProvider authProvider, IUserDAL userDAL) { this.workoutDAL = workoutDAL; this.userDAL = userDAL; this.equipmentDAL = equipmentDAL; this.visitDAL = visitDAL; this.authProvider = authProvider; }
public UserDetailController(IUserDAL _userDAL, IUserCardDAL _userCardDAL, IUserAddressDAL _userAddressDAL, ICityDAL _cityDAL, IDistrictDAL _districtDAL, IOrderDAL _orderDAL) { orderDAL = _orderDAL; districtDAL = _districtDAL; cityDAL = _cityDAL; userDAL = _userDAL; userCardDAL = _userCardDAL; userAddressDAL = _userAddressDAL; currentUser = System.Web.HttpContext.Current.Session["user"] as ETicaret.Model.Models.Entity.User; }
public void TestSave() { IUserDAL dal = DALFactory.createUserDAL(); User user = new User(); user.UserName = "******"; user.Password = EncryptUtil.MD5Encrypt("12345678"); user.Type = "5"; dal.save(user); }
//private ContainerBuilder _builder; //private IContainer _IContainer; #endregion #region constructor public UserBLL(IUserDAL userDal) { _iUserDal = userDal; #region regist examp //_builder = new ContainerBuilder(); // //////如果为Winform类型,请使用以下获取Assembly方法 ////_builder.RegisterAssemblyTypes(AppDomain.CurrentDomain.GetAssemblies())//查找程序集中以services结尾的类型 ////.Where(t => t.Name.EndsWith("Services")) ////.AsImplementedInterfaces(); ////_builder.RegisterAssemblyTypes(AppDomain.CurrentDomain.GetAssemblies())//查找程序集中以Repository结尾的类型 ////.Where(t => t.Name.EndsWith("Repository")) ////.AsImplementedInterfaces(); ////如果有web类型,请使用如下获取Assenbly方法 ////var assemblys = BuildManager.GetReferencedAssemblies().Cast<Assembly>().ToList(); ////_builder.RegisterAssemblyTypes(assemblys.ToArray())//查找程序集中以Repository结尾的类型 ////.Where(t => t.Name.EndsWith("Repository")) ////.AsImplementedInterfaces(); // ////_builder.RegisterType<UserQueryDAL>().As<IUserQueryDAL>(); //_IContainer = _builder.Build(); #endregion }
public UserBLL() { userDAL = new UserDAL(); }
public UserBLL(IUserDAL iUserDAL) { _userDAL = iUserDAL; _loggingBLL = new LoggingBLL(); }
public UserService() { this.userDal = new UserDAL(); }
public UsersBLL(IUserDAL iUserDal) { _iUserDal = iUserDal; }
public UserBLL() { _userDAL = new UserDAL(); _loggingBLL = new LoggingBLL(); }
public UserService(IUserDAL dal) { this.userDal = dal; }
public UserBLL() { dal = DALFactory.createUserDAL(); }