Пример #1
0
 private void BtnCalculate_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         LaundryUser user = (LaundryUser)LbUsers.SelectedItem;
         TextWashCost.Text  = user.UnPaidWashes() + "";
         TextException.Text = "Calculated the washcost for " + user.name;
     }
     catch (Exception e1)
     {
         TextException.Text = "Please select a user";
     }
 }
Пример #2
0
 private void BtnRent_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         LaundryUser user = (LaundryUser)LbUsers.SelectedItem;
         Service.Service.UserTotalCostPayed(user);
         TextWashCost.Text  = user.UnPaidWashes() + "";
         TextException.Text = "Added the washcost for " + user.name + " to rent";
     }
     catch (Exception e1)
     {
         TextException.Text = "Please select a user";
     }
 }