/// <summary> /// 返回病人列表 /// </summary> /// <param name="str_msg"></param> /// <returns></returns> public List <PatientModel> GetPatientModels(out string str_msg) { List <PatientModel> arr_Patient = new List <PatientModel>(); DataSet _DataSet = new DataSet(); if (_con.ConInit(out str_msg) && _con.SelPatInformation(out str_msg, out _DataSet, string.Empty)) { DataTable _table = _DataSet.Tables[0]; for (int i = 0; i < _table.Rows.Count; i++) { PatientModel _patientModel = new PatientModel(); _patientModel.PatId = int.Parse(_table.Rows[i]["PatId"] + ""); _patientModel.PatName = _table.Rows[i]["PatName"] + ""; _patientModel.PatAge = int.Parse(_table.Rows[i]["PatAge"] + ""); _patientModel.PatBrithday = _table.Rows[i]["PatBrithday"] + ""; _patientModel.IsRead = int.Parse(_table.Rows[i]["IsRead"] + ""); _patientModel.PatIdCardNo = _table.Rows[i]["PatIdCardNo"] + ""; _patientModel.PatOutCardNo = _table.Rows[i]["PatOutCardNo"] + ""; _patientModel.PatSex = _table.Rows[i]["PatSex"] + ""; _patientModel.PaymentDate = _table.Rows[i]["PaymentDate"] + ""; _patientModel.Remark = _table.Rows[i]["Remark"] + ""; _patientModel.SendDeptId = _table.Rows[i]["SendDeptId"] + ""; _patientModel.SendDeptName = _table.Rows[i]["SendDeptName"] + ""; _patientModel.TelphoneNo = _table.Rows[i]["TelphoneNo"] + ""; arr_Patient.Add(_patientModel); } } return(arr_Patient); }
/// <summary> /// 获取已登记病人信息 /// </summary> /// <returns></returns> public ActionResult GetPatient() { DataSet _PatData = new DataSet(); if (!IPatCon.ConInit(out str_msg) || !IPatCon.SelPatInformation(out str_msg, out _PatData, string.Empty)) { ViewBag.Message = str_msg; ViewBag.PatientDate = null; return(View()); } else { var _PatTable = _PatData.Tables[0]; var arr_PatModel = Convert <PatientModel> .ConvertToList(_PatTable); ViewBag.PatientDate = arr_PatModel.ToList <PatientModel>(); return(View()); } }