/// <summary> /// 医生信息详情 /// </summary> /// <param name="pclsCache"></param> /// <param name="DoctorId"></param> /// <returns></returns> public ResponseResult CmMstUserGetDoctorInfoDetail(DataConnection pclsCache, string DoctorId) { ResponseResult Result = new ResponseResult { data = null, code = 1, msg = "医生详细信息获取失败" }; DoctorInfoDetail ret = new DoctorInfoDetail(); try { if (!pclsCache.Connect()) { return(Result); } CacheSysList List = Cm.MstUser.GetDoctorInfoDetail(pclsCache.CacheConnectionObject, DoctorId); ret.DoctorId = List[0]; ret.DoctorName = List[1]; ret.DeptName = List[2]; ret.PositionName = List[3]; ret.Status = List[4]; ret.DoctorIntro = List[5]; ret.DutyStatus = List[6]; ret.Time1 = List[7]; ret.Time2 = List[8]; ret.RoomName = List[9]; Result = new ResponseResult { data = ret, code = 0, msg = "医生详细信息获取成功" }; return(Result); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DeliverInfoMethod.GetDoctorInfoDetail", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return(Result); } finally { pclsCache.DisConnect(); } }
public void save(string id) { CacheSysList adbk; string newid = ""; string errormessage = ""; try { adbk = new CacheSysList(Encoding.Unicode, true); adbk.Add(id.ToString()); adbk.Add(Name.ToString()); adbk.Add(Street.ToString()); adbk.Add(City.ToString()); adbk.Add(ZipCode.ToString()); adbk.Add(dob.ToString()); adbk.Add(HomePhone.ToString()); adbk.Add(WorkPhone.ToString()); bool?status = User.ADBK.File(adbksrc.conn, adbk, newflag, ref errormessage, ref newid); if (status == false) { MessageBox.Show("更新エラー " + errormessage); return; } if (newflag == true) { adbk = User.ADBK.GetInstanceById(adbksrc.conn, newid); if (adbk.Count == 1) { MessageBox.Show("インスタンスオープンエラー idが存在しません"); return; } updatedatamodel(adbk); } } catch (Exception err) { MessageBox.Show("保存エラー " + err.Message); } }
public void searchbyid(string id) { try { CacheSysList adbk = User.ADBK.GetInstanceById(adbksrc.conn, id); if (adbk.Count == 1) { MessageBox.Show("インスタンスオープンエラー idが存在しません"); return; } updatedatamodel(adbk); } catch (Exception err) { MessageBox.Show("インスタンスオープンエラー " + err.Message); } }
public ResponseResult Login(DataConnection pclsCache, string userId, string password, int type) { ResponseResult result = new ResponseResult { data = null, code = 1, msg = "登录失败" }; try { if (!pclsCache.Connect()) { return(result); } int flag = (int)Cm.MstUser.Login(pclsCache.CacheConnectionObject, userId, password); if (flag == 1) { User user = new User(); CacheSysList List = Cm.MstUser.GetUserInfo(pclsCache.CacheConnectionObject, userId, 99999999); user.userId = userId; user.userName = List[0]; user.occupation = List[2]; user.position = List[4]; user.affiliation = List[6]; result.data = user; result.code = 0; result.msg = "登录成功"; } return(result); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "AccountMethod.Login", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return(result); } finally { pclsCache.DisConnect(); } }
public ResponseResult getDeckInfoById(DataConnection pclsCache, string id) { DeckSectionInfo deckInfo = new DeckSectionInfo(); ResponseResult result = new ResponseResult { data = null, code = 1, msg = "获取甲板分区信息失败" }; try { if (!pclsCache.Connect()) { //MessageBox.Show("Cache数据库连接失败"); return(null); } CacheSysList List = Vs.MstDeckInfo.GetDeckSectionInfo(pclsCache.CacheConnectionObject, id); deckInfo.ID = id; deckInfo.BedCount = Convert.ToInt32(List[2]); deckInfo.BedAvailCount = Convert.ToInt32(List[3]); deckInfo.SurgeryRoomCount = Convert.ToInt32(List[4]); deckInfo.SurgeryRoomAvailCount = Convert.ToInt32(List[5]); deckInfo.DutyDoctorCount = Convert.ToInt32(List[6]); result.data = deckInfo; result.code = 0; result.msg = "获取甲板分区信息成功"; return(result); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DeckInfoMethod.getDeckInfoById", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return(null); } finally { pclsCache.DisConnect(); } }
public List <string> searchbyname(string name) { idlist.Clear(); List <string> anamelist = new List <string>(); CacheSysList list = User.ADBK.ListByName(adbksrc.conn, name); CacheSysListReader reader = (CacheSysListReader)list.GetEnumerator(); for (int i = 0; i < list.Count; i++) { reader.MoveNext(); string id = reader.Current.ToString().Split(' ')[0].ToString(); if (id == "no") { break; } string aname = reader.Current.ToString().Split(' ')[1].ToString(); anamelist.Add(aname); idlist.Add(id); } return(anamelist); }
/// <summary> /// 伤员信息查询 /// </summary> /// <param name="pclsCache"></param> /// <param name="PatientId"></param> /// <param name="Gender"></param> /// <param name="PatientName"></param> /// <param name="BloodType"></param> /// <returns></returns> public ResponseResult CmPDAInfoGetPatientsInfo(DataConnection pclsCache, string PatientId, int Gender, string PatientName, string BloodType) { ResponseResult Result = new ResponseResult { data = null, code = 1, msg = "伤员信息获取失败" }; List <PatientInfo> list = new List <PatientInfo>(); CacheCommand cmd = null; CacheDataReader cdr = null; try { if (!pclsCache.Connect()) { return(Result); } cmd = new CacheCommand(); cmd = Cm.PDAInfo.GetPatientsInfo(pclsCache.CacheConnectionObject); cmd.Parameters.Add("PatientId", CacheDbType.NVarChar).Value = PatientId; cmd.Parameters.Add("Gender", CacheDbType.NVarChar).Value = Gender; cmd.Parameters.Add("PatientName", CacheDbType.NVarChar).Value = PatientName; cmd.Parameters.Add("BloodType", CacheDbType.NVarChar).Value = BloodType; cdr = cmd.ExecuteReader(); while (cdr.Read()) { list.Add(new PatientInfo { PatientId = cdr["PatientId"].ToString(), PatientName = cdr["PatientName"].ToString(), Gender = cdr["Gender"].ToString(), Birthday = cdr["Birthday"].ToString(), BloodType = cdr["BloodType"].ToString(), DrugAllergy = cdr["DrugAllergy"].ToString(), Diagnosis = cdr["Diagnosis"].ToString(), ToPlace = cdr["ToPlace"].ToString() }); if (PatientId != null) { CacheSysList PDAInfo = Cm.PDAInfo.GetPDAInfo(pclsCache.CacheConnectionObject, PatientId); if (PDAInfo == null) { list = new List <PatientInfo>(); } break; } } Result = new ResponseResult { data = list, code = 0, msg = "伤员信息获取成功" }; return(Result); } catch (Exception ex) { HygeiaComUtility.WriteClientLog(HygeiaEnum.LogType.ErrorLog, "DeliverInfoMethod.GetPatientsInfo", "数据库操作异常! error information : " + ex.Message + Environment.NewLine + ex.StackTrace); return(Result); } finally { if ((cdr != null)) { cdr.Close(); cdr.Dispose(true); cdr = null; } if ((cmd != null)) { cmd.Parameters.Clear(); cmd.Dispose(); cmd = null; } pclsCache.DisConnect(); } }
public void updatedatamodel(CacheSysList adbk) { int rs; CacheSysListReader reader = (CacheSysListReader)adbk.GetEnumerator(); reader.MoveNext(); reader.MoveNext(); Name = reader.Current.ToString(); reader.MoveNext(); if (reader.Current != null) { Street = reader.Current.ToString(); } else { Street = ""; } reader.MoveNext(); if (reader.Current != null) { City = reader.Current.ToString(); } else { City = ""; } reader.MoveNext(); if (reader.Current != null) { ZipCode = reader.Current.ToString(); } else { ZipCode = ""; } reader.MoveNext(); if (reader.Current != null) { dob = reader.Current.ToString(); } else { dob = ""; } reader.MoveNext(); if (reader.Current != null) { HomePhone = reader.Current.ToString(); } else { HomePhone = ""; } reader.MoveNext(); if (reader.Current != null) { WorkPhone = reader.Current.ToString(); } else { WorkPhone = ""; } reader.MoveNext(); reader.MoveNext(); bool sts = int.TryParse(reader.Current.ToString(), out rs); Age = rs; reader.MoveNext(); id = reader.Current.ToString(); newflag = false; }