示例#1
0
 /// <summary>
 /// Delete Function
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage())
             {
                 UserInfo infoUser = new UserInfo();
                 UserSP   spUser   = new UserSP();
                 if ((spUser.UserCreationReferenceDelete(decUserId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text      = "Save";
                     btnDelete.Enabled = false;
                     ClearFunction();
                     GridFill();
                 }
             }
         }
         else
         {
             UserInfo infoUser = new UserInfo();
             UserSP   spUser   = new UserSP();
             if ((spUser.UserCreationReferenceDelete(decUserId) == -1))
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text      = "Save";
                 btnDelete.Enabled = false;
                 ClearFunction();
             }
         }
     }
     catch (Exception ex)
     {
         formMDI.infoError.ErrorString = "UC:9" + ex.Message;
     }
 }
示例#2
0
 /// <summary>
 /// Delete Function
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage())
             {
                 UserInfo infoUser = new UserInfo();
                 UserSP   spUser   = new UserSP();
                 if ((spUser.UserCreationReferenceDelete(decUserId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text      = "Save";
                     btnDelete.Enabled = false;
                     ClearFunction();
                     GridFill();
                 }
             }
         }
         else
         {
             UserInfo infoUser = new UserInfo();
             UserSP   spUser   = new UserSP();
             if ((spUser.UserCreationReferenceDelete(decUserId) == -1))
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text      = "Save";
                 btnDelete.Enabled = false;
                 ClearFunction();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("UC:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
示例#3
0
 /// <summary>
 /// Delete Function
 /// </summary>
 public void DeleteFunction()
 {
     try
     {
         if (PublicVariables.isMessageDelete)
         {
             if (Messages.DeleteMessage())
             {
                 UserInfo infoUser = new UserInfo();
                 UserSP spUser = new UserSP();
                 if ((spUser.UserCreationReferenceDelete(decUserId) == -1))
                 {
                     Messages.ReferenceExistsMessage();
                 }
                 else
                 {
                     Messages.DeletedMessage();
                     btnSave.Text = "Save";
                     btnDelete.Enabled = false;
                     ClearFunction();
                     GridFill();
                 }
             }
         }
         else
         {
             UserInfo infoUser = new UserInfo();
             UserSP spUser = new UserSP();
             if ((spUser.UserCreationReferenceDelete(decUserId) == -1))
             {
                 Messages.ReferenceExistsMessage();
             }
             else
             {
                 Messages.DeletedMessage();
                 btnSave.Text = "Save";
                 btnDelete.Enabled = false;
                 ClearFunction();
             }
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("UC:9" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }