public void SetUser(string login,
			string password,
			string firstName,
			string lastName,
			string email,
			string phone,
			int role,
			GroupModel[] groups,
			SoapLibraryPage[] pages,
			out string message)
		{
			message = string.Empty;
			var client = GetAdminClient();
			if (client != null)
			{
				try
				{
					var sessionKey = client.getSessionKey(Login, Password);
					if (!string.IsNullOrEmpty(sessionKey))
						client.setUser(sessionKey, login, password, firstName, lastName, email, phone, groups, pages, role);
					else
						message = "Couldn't complete operation.\nLogin or password are not correct.";
				}
				catch (Exception ex)
				{
					message = string.Format("Couldn't complete operation.\n{0}.", ex.Message);
				}
			}
			else
				message = "Couldn't complete operation.\nServer is unavailable.";
		}
		public void SetGroup(string id, string name, UserModel[] users, SoapLibraryPage[] pages, out string message)
		{
			message = string.Empty;
			var client = GetAdminClient();
			if (client != null)
			{
				try
				{
					var sessionKey = client.getSessionKey(Login, Password);
					if (!string.IsNullOrEmpty(sessionKey))
						client.setGroup(sessionKey, id, name, users, pages);
					else
						message = "Couldn't complete operation.\nLogin or password are not correct.";
				}
				catch (Exception ex)
				{
					message = string.Format("Couldn't complete operation.\n{0}.", ex.Message);
				}
			}
			else
				message = "Couldn't complete operation.\nServer is unavailable.";
		}
 /// <remarks/>
 public void setGroupAsync(string sessionKey, string id, string name, UserModel[] assignedUsers, SoapLibraryPage[] assignedPages, object userState) {
     if ((this.setGroupOperationCompleted == null)) {
         this.setGroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsetGroupOperationCompleted);
     }
     this.InvokeAsync("setGroup", new object[] {
                 sessionKey,
                 id,
                 name,
                 assignedUsers,
                 assignedPages}, this.setGroupOperationCompleted, userState);
 }
 /// <remarks/>
 public void setGroupAsync(string sessionKey, string id, string name, UserModel[] assignedUsers, SoapLibraryPage[] assignedPages) {
     this.setGroupAsync(sessionKey, id, name, assignedUsers, assignedPages, null);
 }
 public void setGroup(string sessionKey, string id, string name, UserModel[] assignedUsers, SoapLibraryPage[] assignedPages) {
     this.Invoke("setGroup", new object[] {
                 sessionKey,
                 id,
                 name,
                 assignedUsers,
                 assignedPages});
 }
 /// <remarks/>
 public void setUserAsync(string sessionKey, string login, string password, string firstName, string lastName, string email, string phone, GroupModel[] assignedGroups, SoapLibraryPage[] assignedPages, int role, object userState) {
     if ((this.setUserOperationCompleted == null)) {
         this.setUserOperationCompleted = new System.Threading.SendOrPostCallback(this.OnsetUserOperationCompleted);
     }
     this.InvokeAsync("setUser", new object[] {
                 sessionKey,
                 login,
                 password,
                 firstName,
                 lastName,
                 email,
                 phone,
                 assignedGroups,
                 assignedPages,
                 role}, this.setUserOperationCompleted, userState);
 }
 /// <remarks/>
 public void setUserAsync(string sessionKey, string login, string password, string firstName, string lastName, string email, string phone, GroupModel[] assignedGroups, SoapLibraryPage[] assignedPages, int role) {
     this.setUserAsync(sessionKey, login, password, firstName, lastName, email, phone, assignedGroups, assignedPages, role, null);
 }
 public void setUser(string sessionKey, string login, string password, string firstName, string lastName, string email, string phone, GroupModel[] assignedGroups, SoapLibraryPage[] assignedPages, int role) {
     this.Invoke("setUser", new object[] {
                 sessionKey,
                 login,
                 password,
                 firstName,
                 lastName,
                 email,
                 phone,
                 assignedGroups,
                 assignedPages,
                 role});
 }