Esempio n. 1
0
        private void onClientEvents()
        {
            BLL.FMCGHubClient.FMCGHub.On <BLL.Designation>("userType_Save", (uom) => {
                this.Dispatcher.Invoke(() =>
                {
                    uom.Save(true);
                });
            });

            BLL.FMCGHubClient.FMCGHub.On("userType_Delete", (Action <int>)((pk) => {
                this.Dispatcher.Invoke((Action)(() => {
                    BLL.Designation uom = new BLL.Designation();
                    uom.Find((int)pk);
                    uom.Delete((bool)true);
                }));
            }));
        }
Esempio n. 2
0
 private void btnDelete_Click(object sender, RoutedEventArgs e)
 {
     if (data.Id == 0)
     {
         MessageBox.Show("No Records to Delete");
     }
     else
     {
         if (!BLL.UserAccount.AllowDelete(FormName))
         {
             MessageBox.Show(string.Format(Message.PL.DenyDelete, FormName));
         }
         else if (MessageBox.Show("Do you want to Delete this record?", "DELETE", MessageBoxButton.YesNo) != MessageBoxResult.No)
         {
             if (data.Delete() == true)
             {
                 MessageBox.Show("Deleted");
                 data.Clear();
             }
         }
     }
 }