Beispiel #1
0
        private void FillGridTasks()
        {
            gridTasks.BeginUpdate();
            gridTasks.Columns.Clear();
            gridTasks.Columns.Add(new ODGridColumn("Date", -1));
            gridTasks.Columns.Add(new ODGridColumn("TaskList", -1));
            gridTasks.Columns.Add(new ODGridColumn("Done", 40)
            {
                TextAlign = HorizontalAlignment.Center
            });
            gridTasks.Columns.Add(new ODGridColumn("Unlink", 40, HorizontalAlignment.Center));
            gridTasks.NoteSpanStart = 0;
            gridTasks.NoteSpanStop  = 3;
            gridTasks.Rows.Clear();
            List <Task> listTasks = _listJobLinks.FindAll(x => x.LinkType == JobLinkType.Task)
                                    .Select(x => Tasks.GetOne(x.FKey))
                                    .Where(x => x != null)
                                    .OrderBy(x => x.DateTimeEntry).ToList();

            foreach (Task task in listTasks)
            {
                ODGridRow row = new ODGridRow()
                {
                    Tag = task.TaskNum
                };                                                                 //taskNum
                row.Cells.Add(task.DateTimeEntry.ToShortDateString());
                row.Cells.Add(TaskLists.GetOne(task.TaskListNum)?.Descript ?? "<TaskListNum:" + task.TaskListNum + ">");
                row.Cells.Add(task.TaskStatus == TaskStatusEnum.Done?"X":"");
                row.Cells.Add("X");
                row.Note = task.Descript.Left(100, true).Trim();
                gridTasks.Rows.Add(row);
            }
            gridTasks.EndUpdate();
        }
Beispiel #2
0
 private void FormTaskListSelect_Load(object sender, System.EventArgs e)
 {
     SetLabelText();
     _userCurTaskListInbox = TaskLists.GetOne(Security.CurUser.TaskListInBox);
     if (_userCurTaskListInbox != null)
     {
         _userCurTaskListInbox.Descript = Lan.g(this, "My Inbox") + ": " + _userCurTaskListInbox.Descript;
     }
     else
     {
         //Is null when the current user does not have an inbox set up
         //or if OType is TaskObjectType.Patient and the current users inbox is not of ObjectType Patient.
     }
     FillList();
 }