예제 #1
0
파일: frmRole.cs 프로젝트: nwelsheimer/NBS
 /// <summary>
 /// Delete Function
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage())
             {
                 RoleInfo infoRole = new RoleInfo();
                 RoleSP   spRole   = new RoleSP();
                 if ((spRole.RoleReferenceDelete(decRoleId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text      = "Save";
                     btnDelete.Enabled = false;
                     ClearFunction();
                 }
             }
         }
         else
         {
             RoleInfo infoRole = new RoleInfo();
             RoleSP   spRole   = new RoleSP();
             if (spRole.RoleReferenceDelete(decRoleId) == -1)
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text      = "Save";
                 btnDelete.Enabled = false;
                 ClearFunction();
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "RL:7" + ex.Message;
     }
 }
예제 #2
0
 /// <summary>
 /// Delete Function
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage())
             {
                 RoleInfo infoRole = new RoleInfo();
                 RoleSP   spRole   = new RoleSP();
                 if ((spRole.RoleReferenceDelete(decRoleId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text      = "Save";
                     btnDelete.Enabled = false;
                     ClearFunction();
                 }
             }
         }
         else
         {
             RoleInfo infoRole = new RoleInfo();
             RoleSP   spRole   = new RoleSP();
             if (spRole.RoleReferenceDelete(decRoleId) == -1)
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text      = "Save";
                 btnDelete.Enabled = false;
                 ClearFunction();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RL:7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
예제 #3
0
 /// <summary>
 /// Delete Function
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage())
             {
                 RoleInfo infoRole = new RoleInfo();
                 RoleSP spRole = new RoleSP();
                 if ((spRole.RoleReferenceDelete(decRoleId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text = "Save";
                     btnDelete.Enabled = false;
                     ClearFunction();
                 }
             }
         }
         else
         {
             RoleInfo infoRole = new RoleInfo();
             RoleSP spRole = new RoleSP();
             if (spRole.RoleReferenceDelete(decRoleId) == -1)
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text = "Save";
                 btnDelete.Enabled = false;
                 ClearFunction();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("RL:7" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }