Exemplo n.º 1
0
 //初始化ViewModel中的警报列表
 public List<AlertInfo> InitialAlertList(DataTable AlertRecords)
 {
     List<AlertInfo> AlertRecordList = new List<AlertInfo>();
     {
         foreach (DataRow item in AlertRecords.Rows)
         {
             AlertInfo alertRecord = new AlertInfo();
             alertRecord.UserId = item["PatientId"].ToString();
             alertRecord.UserName = item["PatientName"].ToString();
             alertRecord.AlertTypeName = item["AlertTypeName"].ToString();
             alertRecord.AlertItemName = item["AlertItem"].ToString();
             alertRecord.AlertDateTime = item["AlertDateTime"].ToString();
             alertRecord.ProcessFlag = Convert.ToInt32(item["ProcessFlag"]);
             alertRecord.SortNo = Convert.ToInt32(item["SortNo"]);
             AlertRecordList.Add(alertRecord);
         }
     }
     return AlertRecordList;
 }
Exemplo n.º 2
0
        public static void GetTrnList(ServicesSoapClient _ServicesSoapClient, ref DataTable PatientAlertInfoList, ref PatientAlertViewModel Trn, bool flag)
        {
            Trn.AlertList.Clear();
            Trn.AlertList = new List<AlertInfo>();
            if (flag == false)
            {
                DataSet PatientAlertDS = new DataSet();
                //DataTable PatientAlertInfoList = new DataTable();
                PatientAlertDS = _ServicesSoapClient.GetTrnAlertRecordList(Trn.UserId);
                PatientAlertInfoList = PatientAlertDS.Tables[0];
            }
            int processFlag = Convert.ToInt32(Trn.AlertStatusSelected);
            DataTable dt = new DataTable();
            dt = OtherCs.TrnFunctions.SelectAlerts(PatientAlertInfoList, processFlag);
            foreach (DataRow PatientAlertInfoListRow in dt.Rows)
            {
                AlertInfo AlertInfoItem = new AlertInfo();
                AlertInfoItem.UserId = Trn.UserId;
                AlertInfoItem.SortNo = Convert.ToInt32(PatientAlertInfoListRow["SortNo"]);
                AlertInfoItem.AlertTypeName = PatientAlertInfoListRow["AlertTypeName"].ToString();
                AlertInfoItem.AlertItemName = PatientAlertInfoListRow["AlertItem"].ToString();
                AlertInfoItem.AlertDateTime = PatientAlertInfoListRow["AlertDateTime"].ToString();
                AlertInfoItem.ProcessFlag = Convert.ToInt32(PatientAlertInfoListRow["ProcessFlag"]);

                Trn.AlertList.Add(AlertInfoItem);
            }
        }