示例#1
0
		private void btnSave_Click(object sender, EventArgs e)
		{
			Operator op = new Operator();
			if (lstOperators.SelectedIndex > -1)
			{
				op = lstOperators.SelectedItem as Operator;
			}

			if (op != null)
			{
				op.OperatorName = txtName.Text;
				op.Email = txtEmail.Text;
				op.Password = txtPassword.Text;

				// Reset the department
				op.Department = "";

				foreach (string dep in txtDepartment.Text.Split('\n'))
				{
					op.Department += dep.Replace("\r", "").Trim() + ",";
				}

				op.Department = op.Department.Trim(',');

			}

			ws.Save(new Guid(Program.CurrentOperator.Password), op);

			FetchAndBind();
		}
示例#2
0
 /// <remarks/>
 public void DeleteAsync(System.Guid key, Operator op, object userState) {
     if ((this.DeleteOperationCompleted == null)) {
         this.DeleteOperationCompleted = new System.Threading.SendOrPostCallback(this.OnDeleteOperationCompleted);
     }
     this.InvokeAsync("Delete", new object[] {
                 key,
                 op}, this.DeleteOperationCompleted, userState);
 }
示例#3
0
 /// <remarks/>
 public void DeleteAsync(System.Guid key, Operator op) {
     this.DeleteAsync(key, op, null);
 }
示例#4
0
 public bool Delete(System.Guid key, Operator op) {
     object[] results = this.Invoke("Delete", new object[] {
                 key,
                 op});
     return ((bool)(results[0]));
 }
示例#5
0
 /// <remarks/>
 public void SaveAsync(System.Guid key, Operator op) {
     this.SaveAsync(key, op, null);
 }
示例#6
0
 /// <remarks/>
 public void GetChatRequestsAsync(System.Guid key, Operator op, object userState) {
     if ((this.GetChatRequestsOperationCompleted == null)) {
         this.GetChatRequestsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetChatRequestsOperationCompleted);
     }
     this.InvokeAsync("GetChatRequests", new object[] {
                 key,
                 op}, this.GetChatRequestsOperationCompleted, userState);
 }
示例#7
0
 /// <remarks/>
 public void GetChatRequestsAsync(System.Guid key, Operator op) {
     this.GetChatRequestsAsync(key, op, null);
 }
示例#8
0
 public ChatRequest[] GetChatRequests(System.Guid key, Operator op) {
     object[] results = this.Invoke("GetChatRequests", new object[] {
                 key,
                 op});
     return ((ChatRequest[])(results[0]));
 }