Beispiel #1
0
        private void btnDelClass_Click(object sender, System.EventArgs e)
        {
            if (Meta.IsEmpty)
            {
                return;
            }
            if (DS.admpay_income.Rows.Count == 0)
            {
                return;
            }
            Meta.GetFormData(true);
            DataRow Curr = DS.admpay_income.Rows[0];

            DataTable SourceTable;
            DataRow   CurrDR;

            bool res = Meta.myHelpForm.GetCurrentRow(DGridDettagliClassificazioni,
                                                     out SourceTable, out CurrDR);

            if (!res)
            {
                return;
            }
            if (CurrDR == null)
            {
                return;
            }


            if (MessageBox.Show(
                    "Cancello la classificazione selezionata?",
                    "Richiesta di conferma",
                    MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }


            DeleteImpClassMov(CurrDR);

            HelpForm.SetLastSelected(SourceTable, null);
            Meta.myHelpForm.SetDataRowRelated(DGridClassificazioni.FindForm(), SourceTable, null);
            Meta.myHelpForm.ControlChanged(DGridClassificazioni, null);
            Meta.FreshForm();
        }