Пример #1
0
   public void btnCreateGroup_Click(object sender, EventArgs e)
   {
       string message;
       string groupName = MyUtilities.clean(AddGroupName.Text);
       groupName = groupName.Trim();
       if (groupName == "")
       {
           //ShowErrorMessage("No group name entered.  Please try again.");  
           return;
       }

      

       int successCreate = groupManagement.add_new_group(groupName, username);
       if (successCreate == 0)
       {
           message = "Group name is already in use. Please choose a new group name.";
           logFiles.ErrorMessageLog(message);
           ShowErrorMessage(message);
           
          ModalPopupExtender3.Show();
           return;
       }
       if (successCreate == -1)
       {
           message = "Couldn't find added Group name TIMING!!!.";
           logFiles.ErrorMessageLog(message);
           ShowErrorMessage(message);
           
           return;
       }

       CurrentGroupName = groupName;
       ModalPopupExtender3.Hide();
       DropDownList2Bind();
       ModalPopupExtender3.Hide();

       //ShowErrorMessage("added group " + groupName);
       message = "User group " + groupName + " created.";
       MailInfo.SendMail(message, MailInfo.GROUP_CREATED);

       SetUserGridData();
  
   }