public Form2(IUserService userService) { InitializeComponent(); this.userService = userService; container = Boostraper.Init(); GetProfileId(); ProfileDetails(userService); }
public Form1(IUserService userService, IUnitOfWork unitOfWork) { InitializeComponent(); Control.IsKeyLocked(Keys.CapsLock); this.userService = userService; this.unitOfWork = unitOfWork; container = Boostraper.Init(); }
static void Main() { /*var container = new UnityContainer(); * * * container.RegisterType<IAddressService, AddressService>(); * container.RegisterType<ICategoryService, CategoryService>(); * container.RegisterType<IRoleService,RoleService>(); * container.RegisterType<IUserService, UserService>(); * container.RegisterType<IUnitOfWork, UnitOfWork>();*/ var container = Boostraper.Init(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(container.Resolve <Form1>()); }
public Form3(ICategoryService categoryService, IGoodService goodService, ICartGoodService cartgoodService, IUnitOfWork unitOfWork) { InitializeComponent(); container = Boostraper.Init(); this.categoryService = categoryService; this.goodService = goodService; this.cartgoodService = cartgoodService; this.unitOfWork = unitOfWork; List <CategoryDTO> categories = categoryService.GetAllCategories(); comboBox1.DataSource = categories; comboBox1.DisplayMember = "Name"; comboBox1.ValueMember = "Id"; comboBox1.SelectedIndexChanged += comboBox1_SelectedIndexChanged; //List<GoodDTO> goods = goodService.GetGoods(); //comboBox2.DataSource = goods; //comboBox2.DisplayMember = "Name"; //comboBox2.ValueMember = "Id"; //comboBox2.SelectedIndexChanged += comboBox2_SelectedIndexChanged; }