/// <summary>Snippet for CreateGroup</summary> public void CreateGroup() { // Snippet: CreateGroup(ProjectName,Group,CallSettings) // Create client GroupServiceClient groupServiceClient = GroupServiceClient.Create(); // Initialize request argument(s) ProjectName name = new ProjectName("[PROJECT]"); Group group = new Group(); // Make the request Group response = groupServiceClient.CreateGroup(name, group); // End snippet }
/// <summary>Snippet for CreateGroup</summary> public void CreateGroup_RequestObject() { // Snippet: CreateGroup(CreateGroupRequest,CallSettings) // Create client GroupServiceClient groupServiceClient = GroupServiceClient.Create(); // Initialize request argument(s) CreateGroupRequest request = new CreateGroupRequest { ProjectName = new ProjectName("[PROJECT]"), Group = new Group(), }; // Make the request Group response = groupServiceClient.CreateGroup(request); // End snippet }
private void BtnCreate_Click(object sender, EventArgs e)//Create group pressed { if (groupId != 0) { if (!txtName.Text.Equals("") && client.UpdateGroup(txtName.Text, groupId)) { txtName.Text = ""; groupId = 0; BtnCreate.Text = "Create new group"; txtUserName.Enabled = false; BtnAddUser.Enabled = false; } } else { if (!txtName.Text.Equals("") && client.CreateGroup(txtName.Text, profileId)) { txtName.Text = ""; txtUserName.Enabled = false; BtnAddUser.Enabled = false; } } ButtonRefresh_Click(null, null); }