Exemplo n.º 1
0
 private void RemoveServiceButton_Click(object sender, EventArgs e)
 {
     if (currentBill.Id == 0)
     {
         FormUtilities.NotifyFailure();
         return;
     }
     if (LazyWorker <BillDetail> .Delete(FilledDataToBillDetail()))
     {
         LoadBillsServices();
         FormUtilities.NotifySuccess();
     }
     else
     {
         FormUtilities.NotifyFailure();
     }
 }
Exemplo n.º 2
0
 private void AddServiceButton_Click(object sender, EventArgs e)
 {
     if (currentBill.Id == 0 || ServiceComboBox.SelectedIndex == 0)
     {
         FormUtilities.NotifyFailure();
         return;
     }
     if (LazyWorker <BillDetail> .Insert(FilledDataToBillDetail()) > 0)
     {
         LoadBillsServices();
         FormUtilities.NotifySuccess();
     }
     else
     {
         FormUtilities.NotifyFailure();
     }
 }
Exemplo n.º 3
0
 private void DeleteBillButton_Click(object sender, EventArgs e)
 {
     if (LazyWorker <BillModel> .Delete
         (
             new BillModel()
     {
         Id = currentBill.Id
     }
         ))
     {
         SetCurrentBill(new BillDisplay());
         FormUtilities.NotifySuccess();
     }
     else
     {
         FormUtilities.NotifyFailure();
     }
 }
Exemplo n.º 4
0
 private void SaveBillButton_Click(object sender, EventArgs e)
 {
     if (LazyWorker <BillModel> .Update
         (
             new BillModel()
     {
         Id = currentBill.Id,
         CustomerId = (CustomerComboBox.SelectedIndex == 0 ? null : (int?)CustomerComboBox.SelectedIndex),
         EmployeeId = (EmployeeComboBox.SelectedIndex == 0 ? null : (int?)EmployeeComboBox.SelectedIndex),
         CreatingDay = currentBill.CreatingDay
     }
         ))
     {
         FormUtilities.NotifySuccess();
     }
     else
     {
         FormUtilities.NotifyFailure();
     }
 }