示例#1
0
 public int AddCluster(ClusterInfo cluster)
 {
     return ServerController.AddCluster(cluster);
 }
示例#2
0
 public int AddCluster(ClusterInfo cluster)
 {
     return(ServerController.AddCluster(cluster));
 }
示例#3
0
        public static int AddCluster(ClusterInfo cluster)
        {
            // check account
            int accountCheck = SecurityContext.CheckAccount(DemandAccount.NotDemo | DemandAccount.IsAdmin
                | DemandAccount.IsActive);
            if (accountCheck < 0) return accountCheck;

            return DataProvider.AddCluster(cluster.ClusterName);
        }
        protected void cmdAddCluster_Click(object sender, EventArgs e)
        {
            ClusterInfo cluster = new ClusterInfo();
            cluster.ClusterName = txtClusterName.Text.Trim();

            try
            {
                int result = ES.Services.Servers.AddCluster(cluster);
                if (result < 0)
                {
                    ShowResultMessage(result);
                    return;
                }
            }
            catch (Exception ex)
            {
                ShowErrorMessage("SERVER_ADD_CLUSTER", ex);
                return;
            }

            // rebind
            BindClusters();
            txtClusterName.Text = "";
        }
示例#5
0
 /// <remarks/>
 public void AddClusterAsync(ClusterInfo cluster, object userState) {
     if ((this.AddClusterOperationCompleted == null)) {
         this.AddClusterOperationCompleted = new System.Threading.SendOrPostCallback(this.OnAddClusterOperationCompleted);
     }
     this.InvokeAsync("AddCluster", new object[] {
                 cluster}, this.AddClusterOperationCompleted, userState);
 }
示例#6
0
 /// <remarks/>
 public void AddClusterAsync(ClusterInfo cluster) {
     this.AddClusterAsync(cluster, null);
 }
示例#7
0
 /// <remarks/>
 public System.IAsyncResult BeginAddCluster(ClusterInfo cluster, System.AsyncCallback callback, object asyncState) {
     return this.BeginInvoke("AddCluster", new object[] {
                 cluster}, callback, asyncState);
 }
示例#8
0
 public int AddCluster(ClusterInfo cluster) {
     object[] results = this.Invoke("AddCluster", new object[] {
                 cluster});
     return ((int)(results[0]));
 }