/// <summary> /// Конструктор форми Cashier який ініціалізує тип продуктів та продукти /// </summary> /// <param name="dbService"></param> /// <param name="user"></param> public Cashier(ShopDbService dbService, User user) { InitializeComponent(); this.dbService = dbService; this.user = user; textBoxCashierName.Text = string.Format("{0} {1}", user.Name, user.Surname); List <ProductType> types = dbService.GetProductTypes(); for (int i = 0; i < types.Count; i++) { comboBoxProductType.Items.Add(types[i].Name); } if (comboBoxProductType.Items.Count > 0) { comboBoxProductType.SelectedIndex = 0; } }
public Login() { InitializeComponent(); dbService = new ShopDbService(); }
/// <summary> /// Конструктор Адміна /// </summary> /// <param name="dbService"></param> /// <param name="user"></param> public Admin(ShopDbService dbService, User user) { InitializeComponent(); this.dbService = dbService; this.user = user; }