/// <summary>
 /// Function to delete a company
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         decimal decCompanyIdForTemp = PublicVariables._decCurrentCompanyId;
         CompanyCreationBll BllCompanyCreation = new CompanyCreationBll();
         PublicVariables._decCurrentCompanyId = 0;
         CompanyCreationBll bllExCompanyCreation = new CompanyCreationBll();
         CompanyPathBll bllExCompanyPath = new CompanyPathBll();
         bllExCompanyCreation.CompanyDelete(decCompanyIdForTemp);
         bllExCompanyPath.CompanyPathDelete(decCompanyIdForTemp);
         Messages.DeletedMessage();
         Application.Restart();
     }
     catch (Exception ex)
     {
         MessageBox.Show("CR12:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }