Example #1
0
 private void ServiceForm_Load_1(object sender, EventArgs e)
 {
     listBox1.DataSource = sc.GetAllServices();
     //foreach (Service s in sc.GetServices())
     //{
     //    listBox1.Items.Add(s);
     //}
     listBox1.DisplayMember = "Title";
 }
Example #2
0
        public void Test_GetAllServices()
        {
            //Arrange
            var result = servicesController.GetAllServices();

            try
            {
                //Acts
                List <Service> services;
                result.TryGetContentValue <List <Service> >(out services);

                //Assert
                Assert.IsTrue(services.Count > 0);
            }
            catch (Exception)
            {
                Assert.Fail();
            }
        }
Example #3
0
 private void BookingForm_Load(object sender, EventArgs e)
 {
     lb_employee.DataSource    = employeeController.GetEmployees();
     lb_employee.DisplayMember = "FirstName";
     foreach (Service service in servicesController.GetAllServices())
     {
         ListViewItem i = new ListViewItem();
         i.Tag         = service;
         i.Text        = service.Title;
         i.ToolTipText = service.Price.ToString();
         lv_services.Items.Add(i);
     }
     foreach (Product product in productsController.GetAllProducts())
     {
         ListViewItem i = new ListViewItem();
         i.Tag         = product;
         i.Text        = product.Title;
         i.ToolTipText = product.RetailPrice.ToString();
         lv_products.Items.Add(i);
     }
 }
        public void GetAllServices_WhenCalled_ReturnsOkObjectResult()
        {
            var response = controller.GetAllServices();

            Assert.IsType <OkObjectResult>(response.Result);
        }
Example #5
0
 private void AddServiceForm_Load(object sender, EventArgs e)
 {
     Lb_services.DataSource    = servicesController.GetAllServices();
     Lb_services.DisplayMember = "Title";
 }