コード例 #1
0
		private void butAddNote_Click(object sender,EventArgs e) {
			if(OwnedForms.Length>0) {
				MsgBox.Show(this,"One or more task note edit windows are open and must be closed.");
				return;
			}
			FormTaskNoteEdit form=new FormTaskNoteEdit();
			form.TaskNoteCur=new TaskNote();
			form.TaskNoteCur.TaskNum=TaskCur.TaskNum;
			form.TaskNoteCur.DateTimeNote=DateTime.Now;//Will be slightly adjusted at server.
			form.TaskNoteCur.UserNum=Security.CurUser.UserNum;
			form.TaskNoteCur.IsNew=true;
			form.EditComplete=OnNoteEditComplete_Add;
			form.Show(this);//non-modal subwindow, but if the parent is closed by the user when the child is open, then the child is forced closed along with the parent and after the parent.
		}
コード例 #2
0
		private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e) {
			if(OwnedForms.Length>0) {
				MsgBox.Show(this,"One or more task note edit windows are open and must be closed.");
				return;
			}
			FormTaskNoteEdit form=new FormTaskNoteEdit();
			form.TaskNoteCur=NoteList[e.Row];
			form.EditComplete=OnNoteEditComplete_CellDoubleClick;
			form.Show(this);//non-modal subwindow, but if the parent is closed by the user when the child is open, then the child is forced closed along with the parent and after the parent.
		}
コード例 #3
0
		private void butReply_Click(object sender,EventArgs e) {
			//This can't happen if IsNew
			//This also can't happen if the task is mine with no replies.
			//Button not visible unless a ReplyToUserNum has been calculated successfully.
			if(OwnedForms.Length>0) {
				MsgBox.Show(this,"One or more task note edit windows are open and must be closed.");
				return;
			}
			long inbox=Userods.GetInbox(ReplyToUserNum);
			if(inbox==0) {
				MsgBox.Show(this,"No inbox has been set up for this user yet.");
				return;
			}
			if(!notesChanged && textDescript.Text==TaskCur.Descript) {//nothing changed
				FormTaskNoteEdit form=new FormTaskNoteEdit();
				form.TaskNoteCur=new TaskNote();
				form.TaskNoteCur.TaskNum=TaskCur.TaskNum;
				form.TaskNoteCur.DateTimeNote=DateTime.Now;//Will be slightly adjusted at server.
				form.TaskNoteCur.UserNum=Security.CurUser.UserNum;
				form.TaskNoteCur.IsNew=true;
				form.EditComplete=OnNoteEditComplete_Reply;
				form.Show(this);//non-modal subwindow, but if the parent is closed by the user when the child is open, then the child is forced closed along with the parent and after the parent.
				return;
			}
			TaskCur.TaskListNum=inbox;
			if(!SaveCur()) {
				return;
			}
			DataValid.SetInvalidTask(TaskCur.TaskNum,true);//popup
			DialogResult=DialogResult.OK;
			Close();
		}
コード例 #4
0
ファイル: FormTaskEdit.cs プロジェクト: nampn/ODental
 private void gridMain_CellDoubleClick(object sender,ODGridClickEventArgs e)
 {
     FormTaskNoteEdit form=new FormTaskNoteEdit();
     form.TaskNoteCur=NoteList[e.Row];
     form.ShowDialog();
     if(form.DialogResult==DialogResult.OK) {
         notesChanged=true;
     }
     FillGrid();
 }
コード例 #5
0
ファイル: FormTaskEdit.cs プロジェクト: nampn/ODental
 private void butReply_Click(object sender,EventArgs e)
 {
     //This can't happen if IsNew
     //This also can't happen if the task is mine with no replies.
     //Button not visible unless a ReplyToUserNum has been calculated successfully.
     long inbox=Userods.GetInbox(ReplyToUserNum);
     if(inbox==0) {
         MsgBox.Show(this,"No inbox has been set up for this user yet.");
         return;
     }
     if(!notesChanged && textDescript.Text==TaskCur.Descript) {//nothing changed
         //MsgBox.Show(this,"Please add a note before using the reply button.");
         //return;
         FormTaskNoteEdit form=new FormTaskNoteEdit();
         form.TaskNoteCur=new TaskNote();
         form.TaskNoteCur.TaskNum=TaskCur.TaskNum;
         form.TaskNoteCur.DateTimeNote=DateTime.Now;//Will be slightly adjusted at server.
         form.TaskNoteCur.UserNum=Security.CurUser.UserNum;
         form.TaskNoteCur.IsNew=true;
         form.ShowDialog();
         if(form.DialogResult!=DialogResult.OK) {
             return;
         }
         if(MightNeedSetRead) {//'new' box is checked
             checkNew.Checked=false;
             StatusChanged=true;
             MightNeedSetRead=false;//so that the automation won't happen again
         }
     }
     TaskCur.TaskListNum=inbox;
     if(!SaveCur()){
         return;
     }
     DataValid.SetInvalidTask(TaskCur.TaskNum,true);//popup
     DialogResult=DialogResult.OK;
     Close();
 }
コード例 #6
0
ファイル: FormTaskEdit.cs プロジェクト: nampn/ODental
 private void butAddNote_Click(object sender,EventArgs e)
 {
     FormTaskNoteEdit form=new FormTaskNoteEdit();
     form.TaskNoteCur=new TaskNote();
     form.TaskNoteCur.TaskNum=TaskCur.TaskNum;
     form.TaskNoteCur.DateTimeNote=DateTime.Now;//Will be slightly adjusted at server.
     form.TaskNoteCur.UserNum=Security.CurUser.UserNum;
     form.TaskNoteCur.IsNew=true;
     form.ShowDialog();
     if(form.DialogResult!=DialogResult.OK) {
         return;
     }
     notesChanged=true;
     FillGrid();
     if(MightNeedSetRead) {//'new' box is checked
         checkNew.Checked=false;
         StatusChanged=true;
         MightNeedSetRead=false;//so that the automation won't happen again
     }
 }