コード例 #1
0
 public static bool UndoUseMeals(MealReclamation meal)
 {
     try
     {
         Api.UndoUseMeals(meal.Id);
         return(true);
     }
     catch (Exception e)
     {
         MUtility.ShowException(e);
         return(false);
     }
 }
コード例 #2
0
        private void btnExecute_Click(object sender, EventArgs e)
        {
            if (dgvMeals.SelectedRows.Count == 0)
            {
                return;
            }

            MealReclamation selected = (MealReclamation)dgvMeals.SelectedRows[0].DataBoundItem;
            bool            ops      = (mode == Mode.PogresnaUplata) ? MainController.UndoAddMeals(selected) : MainController.UndoUseMeals(selected);

            LoadData();

            RefreshData();
        }