Esempio n. 1
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.
     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();
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 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
     }
 }