Beispiel #1
0
        private void btn_Delete_Click(object sender, RoutedEventArgs e)
        {
            dynamic           row  = lvPurchase.SelectedItem;
            ConfirmationPopup form = new ConfirmationPopup((string)myResourceDictionary["purchase_confirmationmsg"], header, true);

            form.ShowDialog();
            if (Common._isChecked)
            {
                var result = controller.DeletePurchase(row.PurchaseId);
                //if (result == true)
                //{
                List <PurchaseOrderModel> lstPurchase = controller.GetPurchase().ToList();
                // if (lstPurchase.Any())
                //  {
                _purchase = lstPurchase;
                lvPurchase.ItemsSource = _purchase;
                // ConfirmationPopup form1 = new ConfirmationPopup((string)myResourceDictionary["purchase_deletedsuccessmsg"], header, false);
                // form1.ShowDialog();
                Common.Notification((string)myResourceDictionary["purchaseOrder_deletedsuccessmsg"], header, false);
                ButtonDisable();
                // }
                // else
                // {
                //  ConfirmationPopup form2 = new ConfirmationPopup(responce.FaultData.Detail.ErrorDetails, header, false);
                //    form2.ShowDialog();
                // }
            }
        }