Esempio n. 1
0
        ///<summary>Delete an unusued custom claim form.</summary>
        private void butDelete_Click(object sender, System.EventArgs e)
        {
            if (gridCustom.GetSelectedIndex() == -1)
            {
                MessageBox.Show(Lan.g(this, "Please select a Custom Claim Form first."));
                return;
            }
            ClaimForm claimFormCur = (ClaimForm)gridCustom.Rows[gridCustom.GetSelectedIndex()].Tag;

            if (!MsgBox.Show(this, MsgBoxButtons.OKCancel, "Delete custom claim form?"))
            {
                return;
            }
            if (!ClaimForms.Delete(claimFormCur))
            {
                MsgBox.Show(this, "Claim form is already in use.");
                return;
            }
            changed = true;
            FillGridCustom();
        }
Esempio n. 2
0
 private void butDelete_Click(object sender, System.EventArgs e)
 {
     if (listClaimForms.SelectedIndex == -1)
     {
         MessageBox.Show(Lan.g(this, "Please select an item first."));
         return;
     }
     //ClaimForms.Cur=ClaimForms.ListLong[listClaimForms.SelectedIndex];
     if (ClaimForms.ListLong[listClaimForms.SelectedIndex].UniqueID != "")
     {
         MessageBox.Show(Lan.g(this, "Not allowed to delete a premade claimform, but you can hide it instead."));
         return;
     }
     if (!ClaimForms.Delete(ClaimForms.ListLong[listClaimForms.SelectedIndex]))
     {
         MessageBox.Show(Lan.g(this, "Claim form is already in use."));
         return;
     }
     changed = true;
     ClaimFormItems.RefreshCache();
     FillList();
 }