Beispiel #1
0
 /// <summary>
 /// Function to delete productgroup
 /// </summary>
 private void Delete()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage() == true)
             {
                 ProductGroupInfo InfoProductGroup = new ProductGroupInfo();
                 ProductGroupSP   spProductGroup   = new ProductGroupSP();
                 if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text      = "Save";
                     btnDelete.Enabled = false;
                     ProductGroupUnderComboFillForSearch();
                     Clear();
                 }
             }
         }
         else
         {
             ProductGroupInfo InfoProductGroup = new ProductGroupInfo();
             ProductGroupSP   spProductGroup   = new ProductGroupSP();
             if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1))
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text      = "Save";
                 btnDelete.Enabled = false;
                 Clear();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PG6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Function to delete productgroup
 /// </summary>
 private void Delete()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage() == true)
             {
                 ProductGroupInfo InfoProductGroup = new ProductGroupInfo();
                 ProductGroupSP   spProductGroup   = new ProductGroupSP();
                 if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text      = "Save";
                     btnDelete.Enabled = false;
                     ProductGroupUnderComboFillForSearch();
                     Clear();
                 }
             }
         }
         else
         {
             ProductGroupInfo InfoProductGroup = new ProductGroupInfo();
             ProductGroupSP   spProductGroup   = new ProductGroupSP();
             if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1))
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text      = "Save";
                 btnDelete.Enabled = false;
                 Clear();
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "PG6:" + ex.Message;
     }
 }
Beispiel #3
0
 /// <summary>
 /// Function to delete productgroup
 /// </summary>
 private void Delete()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage() == true)
             {
                 ProductGroupInfo InfoProductGroup = new ProductGroupInfo();
                 ProductGroupSP spProductGroup = new ProductGroupSP();
                 if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text = "Save";
                     btnDelete.Enabled = false;
                     ProductGroupUnderComboFillForSearch();
                     Clear();
                 }
             }
         }
         else
         {
             ProductGroupInfo InfoProductGroup = new ProductGroupInfo();
             ProductGroupSP spProductGroup = new ProductGroupSP();
             if ((spProductGroup.ProductGroupReferenceDelete(decId) == -1))
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text = "Save";
                 btnDelete.Enabled = false;
                 Clear();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("PG6:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }