Exemplo n.º 1
0
 public ActionResult TaskList(string PatientId)
 {
     if (PatientId == null)
     {
         PatientId = Session["PatientId"] as String;
     }
     else
     {
         Session["PatientId"] = PatientId;
     }
     var user = Session["CurrentUser"] as UserAndRole;
     TaskListViewModel tl = new TaskListViewModel();
     tl.PatientId = PatientId;
     tl.Type = 0;
     TLFunctions.GetTaskList(_ServicesSoapClient, ref tl);
     return View(tl);
 }
Exemplo n.º 2
0
        //获取每日任务列表
        public static void GetTaskList(ServicesSoapClient _ServicesSoapClient, ref TaskListViewModel et)
        {
            List<TaskList> undoneList = new List<TaskList>();
            DataSet UndoneDS = _ServicesSoapClient.GetUndoneList(et.PatientId);
            if (UndoneDS.Tables.Count != 0) 
            {
                DataTable UndoneDT = UndoneDS.Tables[0];
                foreach (DataRow dr in UndoneDT.Rows)
                {
                    TaskList task = new TaskList();
                    task.ReminderNo = dr["ReminderNo"].ToString();
                    task.TaskDate = dr["TaskDate"].ToString();
                    task.TaskTime = dr["TaskTime"].ToString();
                    task.TaskDateTime = Functions.ConvertDate(task.TaskDate) + " " + Functions.ConvertTime(task.TaskTime);
                    task.IsDone = Convert.ToInt16(dr["IsDone"].ToString());
                    task.Description = dr["Description"].ToString();
                    task.Content = dr["Content"].ToString();
                    undoneList.Add(task);
                }
                et.UndoneList = undoneList;
            }

            List<TaskList> toDoList = new List<TaskList>();
            DataSet ToDoDS = _ServicesSoapClient.GetToDoList(et.PatientId);
            if (ToDoDS.Tables.Count != 0)
            {
                DataTable ToDoDT = ToDoDS.Tables[0];
                foreach (DataRow dr in ToDoDT.Rows)
                {
                    TaskList task = new TaskList();
                    task.ReminderNo = dr["ReminderNo"].ToString();
                    task.TaskDate = dr["TaskDate"].ToString();
                    task.TaskTime = dr["TaskTime"].ToString();
                    task.TaskDateTime = Functions.ConvertDate(task.TaskDate) + " " + Functions.ConvertTime(task.TaskTime);
                    task.IsDone = Convert.ToInt16(dr["IsDone"].ToString());
                    task.Description = dr["Description"].ToString();
                    task.Content = dr["Content"].ToString();

                    toDoList.Add(task);
                }
                et.ToDoList = toDoList;
            }
        }