Exemplo n.º 1
0
 /// <summary>
 /// Delete Pet
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void bbiDelete_ItemClick(object sender, ItemClickEventArgs e)
 {
     if (petID != null)  //check user is select pet
     {
         //delete pet
         PetModel pm = new PetModel();
         pm.InactivePet(petID);
         //notify for user
         XtraMessageBox.Show("Delete successful!!!", "Pet Shop", MessageBoxButtons.OK,
                             MessageBoxIcon.Information);
     }
     else    //if user is not selete pet then send error message
     {
         XtraMessageBox.Show("Please select a Pet item to delete!!!", "Pet Shop", MessageBoxButtons.OK,
                             MessageBoxIcon.Warning);
     }
 }