Example #1
0
        private void cmdSave_Click(object sender, EventArgs e)
        {
            var customerId = ((ComboBoxItem)cmbUgyfel.SelectedItem).Value;
            var serviceId  = ((ComboBoxItem)cmbSzolgaltatas.SelectedItem).Value;

            var useServices = new UseServices(new UsedServiceRepository(new FileUtil()));

            useServices.Execute(customerId, new List <ServiceModel>()
            {
                new ServiceModel {
                    Id = serviceId, Name = txtSzolgaltatasNev.Text, TaxRate = 27
                }
            });

            MessageBox.Show("Sikeres mentés!");
        }
Example #2
0
        public void ExecuteTest()
        {
            //Arrange
            var useServices = new UseServices(new UsedServiceRepository(new FileUtil()));
            var customer    = "Bukó Attila";
            var services    = new List <ServiceModel>();

            services.Add(new ServiceModel {
                Id = ServiceKey.Hajfestes, Name = "Hajfestés", TaxRate = 27
            });
            services.Add(new ServiceModel {
                Id = ServiceKey.Hajvagas, Name = "Hajvágás", TaxRate = 27
            });
            services.Add(new ServiceModel {
                Id = ServiceKey.BalayageMelir, Name = "Balayage Melír", TaxRate = 27
            });

            //Act
            useServices.Execute(customer, services);
        }