Ejemplo n.º 1
0
        /// <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;
            }
        }
Ejemplo n.º 2
0
 public Login()
 {
     InitializeComponent();
     dbService = new ShopDbService();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Конструктор Адміна
 /// </summary>
 /// <param name="dbService"></param>
 /// <param name="user"></param>
 public Admin(ShopDbService dbService, User user)
 {
     InitializeComponent();
     this.dbService = dbService;
     this.user      = user;
 }