protected BaseController() { NewsService = new NewsRepository(); NewsGroupService = new NewsGroupRepository(); AccountService = new AccountRepository(); ContactService = new ContactRepository(); ProductTypeService = new Respository.ProductTypeRepository(); SiteConfigService = new SiteConfigRespository(); EmailConfigService = new EmailConfigRepository(); MenuConfigService = new MenuConfigRespository(); ProductBrandService = new ProductBrandRespository(); ProductManufacturerService = new ProductManufacturerRespository(); ProductDistributorService = new ProductDistributorRespository(); ProductStoreService = new StoreRespository(); UnitService = new UnitRespository(); ColorService = new ColorRespository(); CountryService = new CountryRespository(); SizeService = new SizeRespository(); ProductAttributeService = new ProductAttributeRespository(); ProductImageService = new ProductImageRespository(); UserService = new UserRespository(); RoleService = new RoleRespository(); PermissionService = new PermissionRespository(); ProductSizeService = new ProductSizeRespository(); ProductColorService = new ProductColorRespository(); ProductSaleOffService = new ProductSaleOffRespository(); ProductService = new ProductRespository(); AdminAccountService = new AdminRespository(); BannerService = new BannerRespository(); }
static void Main() { UserRespository userRepo = new UserRespository(); User newUser = new User(); newUser.Email = "luis.email.com"; newUser.UserId = 1; newUser.UserName = "******"; User newUser2 = new User(); newUser2.Email = "myra.email.com"; newUser2.UserId = 2; newUser2.UserName = "******"; User newUser3 = new User(); newUser3.Email = "Luis.email.com"; newUser3.UserId = 3; newUser3.UserName = "******"; userRepo.Save(newUser); userRepo.Save(newUser2); userRepo.Save(newUser3); userRepo.GetAllUsersByName("2"); }
public TransactionServices(TransactionRespository transactionRespository, MapperProfile mapperProfile, ScratchCardRepository scratchCardRepository, UserRespository userRespository) { this._transactionRespository = transactionRespository; this._mapperProfile = mapperProfile; this._scratchCardRepository = scratchCardRepository; this._userRespository = userRespository; this._stackFrame = new StackFrame(); }
protected void SignUp_Click(object sender, EventArgs e) { UserRespository userRespository = new UserRespository(); UserManager userManager = new UserManager(txtName.Text, txtNumber.Text, txtEmail.Text, txtPassword.Text); if (userRespository.SignUp(userManager)) { Response.Write("<script>alert('Registration successful');</script>"); } else { Response.Write("<script>alert('Registration Failed');</script>"); } }
protected void btnLogin_Click(object sender, EventArgs e) { UserRespository userRespository = new UserRespository(); int userId = Convert.ToInt32(txtUserId.Text); string password = Convert.ToString(txtPassword.Text); if (userRespository.LogIn(userId, password)) { Response.Write("<script>alert('Login Successful');</script>"); } else { Response.Write("<script>alert('Login Failed');</script>"); } }
static void Main() { string path = "Test Directory"; string moveToPath = "../../TestDirectory"; File.CreateText(path); FileManagerClass newManager = new FileManagerClass(); newManager.CreateAFile(path); newManager.MoveFile(path, moveToPath); newManager.CreateDirectory(path); newManager.MoveDirectory(path, moveToPath); UserRespository userRepo = new UserRespository(); User newUser = new User(); newUser.Email = "luis.email.com"; newUser.UserId = 1; newUser.UserName = "******"; User newUser2 = new User(); newUser2.Email = "myra.email.com"; newUser2.UserId = 2; newUser2.UserName = "******"; User newUser3 = new User(); newUser3.Email = "Luis.email.com"; newUser3.UserId = 3; newUser3.UserName = "******"; userRepo.Save(newUser); userRepo.Save(newUser2); userRepo.Save(newUser3); userRepo.GetAllUsersByName("2"); }
public UpdateActionController() { respository = new UserRespository(); }
public DefaultController() { userRespository = new UserRespository(); }
public FOODController() { respository = new UserRespository(); }
public AnimalController() { respository = new UserRespository(); }
static void Main() { try { ShoppingCart myShoppingCart = new ShoppingCart(); myShoppingCart.ExecuteMainMenu(); } catch (ShoppingCartException exception) { Console.WriteLine(exception.Message); } string response = ""; while (response != "5") { List <User> userList = new List <User>(); List <Comment> commentList = new List <Comment>(); UserRespository userRepo = new UserRespository(); UserRespository userComment = new UserRespository(); Console.WriteLine("1. Create User"); Console.WriteLine("2. Create a Comment"); Console.WriteLine("3. Print List of Users"); Console.WriteLine("4. Print List of Comments"); Console.WriteLine("5. Look for a User"); Console.WriteLine("6. Look for a Comment"); Console.WriteLine("7. Create a Data File"); Console.WriteLine("8. Exit the Program"); Console.WriteLine(""); Console.WriteLine("Please select an option: "); Console.ReadLine(); response = Console.ReadLine(); switch (response) { case "1": User user = new User(); user.UserName = "******"; User user2 = new User(); user2.UserName = "******"; userList.Add(user2); User user3 = new User(); user3.UserName = "******"; Console.WriteLine("You have created a user"); break; case "2": Comment hisComment = new Comment(); hisComment.TheBestComment = "The best is yet to Come!"; commentList.Add(hisComment); Console.WriteLine("You have created a comment"); break; case "3": Console.WriteLine("This is the list you wanted: "); foreach (var insideUser in userList) { Console.WriteLine(insideUser.UserId); Console.WriteLine(insideUser.UserName); } break; case "4": Console.WriteLine("This is the list you wanted: "); foreach (var insideComment in commentList) { Console.WriteLine(insideComment.CommentId); Console.WriteLine(insideComment.TheBestComment); } break; case "5": userRepo.GetAllUsersByName(UserName); break; case "6": userComment.GetAllComments(commentList); break; } } }
public WordController() { respository = new UserRespository(); }
public UserServices(UserRespository userRepository, MapperProfile mapperProfile) { this._userRepository = userRepository; this._mapperProfile = mapperProfile; this._stackFrame = new StackFrame(); }
public BattleController() { respository = new UserRespository(); }