private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (!BLL.UserAccount.AllowDelete(Forms.frmReceipt))
     {
         MessageBox.Show(string.Format(Message.PL.DenyDelete, FormName));
     }
     else
     {
         if (MessageBox.Show("Do you want to delete?", "DELETE", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
         {
             Common.AppLib.WriteLog(string.Format("Receipt Delete Begnis=>Id=>{0}", data.Id));
             var rv = data.Delete();
             if (rv == true)
             {
                 Common.AppLib.WriteLog(string.Format("Receipt deleted=>Id=>{0}", data.Id));
                 MessageBox.Show(Message.PL.Delete_Alert);
                 data.Clear();
                 if (data.Id != 0)
                 {
                     btnPrint.IsEnabled = true;
                 }
                 else
                 {
                     btnPrint.IsEnabled = false;
                 }
             }
         }
     }
 }
Ejemplo n.º 2
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (!BLL.UserAccount.AllowDelete(FormName))
     {
         MessageBox.Show(string.Format(Message.PL.DenyDelete, FormName));
     }
     else
     {
         if (MessageBox.Show("Do you want to delete?", "DELETE", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
         {
             var rv = data.Delete();
             if (rv == true)
             {
                 MessageBox.Show(Message.PL.Delete_Alert);
                 data.Clear();
                 if (data.Id != 0)
                 {
                     btnPrint.IsEnabled = true;
                 }
                 else
                 {
                     btnPrint.IsEnabled = false;
                 }
             }
         }
     }
 }
Ejemplo n.º 3
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (MessageBox.Show(string.Format(Message.PL.TransactionDeleteConfirmation, Data.RefNo), "Delete", MessageBoxButton.YesNo) == MessageBoxResult.Yes)
     {
         var rv = Data.Delete();
         if (rv == true)
         {
             MessageBox.Show("Deleted");
             Data.Clear();
         }
     }
 }