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.";
		}
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <remarks/>
 public void setGroupAsync(string sessionKey, string id, string name, UserModel[] assignedUsers, SoapLibraryPage[] assignedPages) {
     this.setGroupAsync(sessionKey, id, name, assignedUsers, assignedPages, null);
 }
예제 #5
0
 public void setGroup(string sessionKey, string id, string name, UserModel[] assignedUsers, SoapLibraryPage[] assignedPages) {
     this.Invoke("setGroup", new object[] {
                 sessionKey,
                 id,
                 name,
                 assignedUsers,
                 assignedPages});
 }
예제 #6
0
 /// <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);
 }
예제 #7
0
 /// <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);
 }
예제 #8
0
 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});
 }