示例#1
0
		///<summary>Send to another user.</summary>
		private void butSend_Click(object sender,EventArgs e) {
			//This button is always present.
			if(OwnedForms.Length>0) {
				MsgBox.Show(this,"One or more task note edit windows are open and must be closed.");
				return;
			}
			if(listObjectType.SelectedIndex==(int)TaskObjectType.Patient) {
				FormTaskListSelect FormT=new FormTaskListSelect(TaskObjectType.Patient);
				FormT.ShowDialog();
				if(FormT.DialogResult!=DialogResult.OK) {
					return;
				}
				TaskCur.TaskListNum=FormT.SelectedTaskListNum;
				TaskListCur=TaskLists.GetOne(TaskCur.TaskListNum);
				textTaskList.Text=TaskListCur.Descript;
				if(!SaveCur()) {
					return;
				}
				DataValid.SetInvalidTask(TaskCur.TaskNum,true);//popup
			}
			else {//to an in-box
				FormTaskSendUser FormT=new FormTaskSendUser();
				FormT.ShowDialog();
				if(FormT.DialogResult!=DialogResult.OK) {
					return;
				}
				TaskCur.TaskListNum=FormT.TaskListNum;
				TaskListCur=TaskLists.GetOne(TaskCur.TaskListNum);
				textTaskList.Text=TaskListCur.Descript;
				if(!SaveCur()) {
					return;
				}
				DataValid.SetInvalidTask(TaskCur.TaskNum,true);//popup
			}
			DialogResult=DialogResult.OK;
			Close();
		}
示例#2
0
 ///<summary>Send to another user.</summary>
 private void butSend_Click(object sender,EventArgs e)
 {
     //This button is always present.
     if(listObjectType.SelectedIndex==(int)TaskObjectType.Patient) {
         FormTaskListSelect FormT=new FormTaskListSelect(TaskObjectType.Patient);
         FormT.ShowDialog();
         if(FormT.DialogResult!=DialogResult.OK) {
             return;
         }
         TaskCur.TaskListNum=FormT.SelectedTaskListNum;
         TaskListCur=TaskLists.GetOne(TaskCur.TaskListNum);
         textTaskList.Text=TaskListCur.Descript;
         if(!SaveCur()) {
             return;
         }
         DataValid.SetInvalidTask(TaskCur.TaskNum,true);//popup
     }
     else {//to an in-box
         FormTaskSendUser FormT=new FormTaskSendUser();
         FormT.ShowDialog();
         if(FormT.DialogResult!=DialogResult.OK) {
             return;
         }
         TaskCur.TaskListNum=FormT.TaskListNum;
         TaskListCur=TaskLists.GetOne(TaskCur.TaskListNum);
         textTaskList.Text=TaskListCur.Descript;
         if(!SaveCur()) {
             return;
         }
         DataValid.SetInvalidTask(TaskCur.TaskNum,true);//popup
     }
     DialogResult=DialogResult.OK;
     Close();
 }