public ActionResult SymptomsManagement(SymptomsViewModel piSymptomsViewData) { if (ModelState.IsValid) { var user = Session["CurrentUser"] as UserAndRole; DateTime? Time = piSymptomsViewData.RecordTime; //取数据库时间 int RecordDate = 0; int RecordTime = 0; OtherCs.SYFunctions.SetRecordDateTime(_ServicesSoapClient, Time, ref RecordDate, ref RecordTime); //往数据库插数据 bool SetSymptomsInfoFlag = OtherCs.SYFunctions.SetSymptomsInfo(_ServicesSoapClient, piSymptomsViewData, RecordDate, RecordTime, user); if (SetSymptomsInfoFlag) { return RedirectToAction("SymptomsManagement"); } else { } } return View(piSymptomsViewData); }
public static bool SetSymptomsInfo(ServicesSoapClient _ServicesSoapClient, SymptomsViewModel sy, int RecordDate, int RecordTime, UserAndRole user) { string symptomtype = sy.SymptomsTypeSelected; //string symptom = Request.Form["SymptomsNameSelected"]; string symptom = sy.SymptomsNameSelected; string Description = sy.Description; string UserId = sy.PId; string VisitId = _ServicesSoapClient.GetNoByNumberingType(6); bool SetSymptomsInfoFlag = _ServicesSoapClient.SetSymptomsInfo(UserId, VisitId, symptomtype, symptom, Description, RecordDate, RecordTime, user.UserId, user.TerminalName, user.TerminalIP, user.DeviceType); return SetSymptomsInfoFlag; }
// GET: /PatientInfo/SymptomsManagement/ public ActionResult SymptomsManagement(string PatientId) { if (PatientId == null) { PatientId = Session["PatientId"] as String; } else { Session["PatientId"] = PatientId; } var user = Session["CurrentUser"] as UserAndRole; SymptomsViewModel SymptomsViewData = new SymptomsViewModel(); SymptomsViewData.UserId = user.UserId; SymptomsViewData.PId = PatientId; SymptomsViewData.SymptomsTypeSelected = "0"; SymptomsViewData.SymptomsNameSelected = "0"; SymptomsViewData.RecordTime = null; OtherCs.SYFunctions.GetSymptomsList(_ServicesSoapClient, ref SymptomsViewData); return View(SymptomsViewData); }
public static void GetSymptomsList(ServicesSoapClient _ServicesSoapClient, ref SymptomsViewModel sy) { DataSet SymptomsDS = new DataSet(); DataTable SymptomsInfoList = new DataTable(); SymptomsDS = _ServicesSoapClient.GetSymptomsListByPId(sy.PId); SymptomsInfoList = SymptomsDS.Tables[0]; foreach (DataRow SymptomsDR in SymptomsInfoList.Rows) { SymptomInfo SymptomInfoItem = new SymptomInfo(); String Date = string.Empty; String Time = string.Empty; SymptomInfoItem.UserId = sy.PId; SymptomInfoItem.VisitId = SymptomsDR["VisitId"].ToString(); SymptomInfoItem.SymptomsNo = Convert.ToInt32(SymptomsDR["SynptomsNo"]); SymptomInfoItem.SymptomsTypeName = SymptomsDR["SymptomsTypeName"].ToString(); SymptomInfoItem.SymptomsName = SymptomsDR["SymptomsName"].ToString(); SymptomInfoItem.Description = SymptomsDR["Description"].ToString(); SymptomInfoItem.RecordDate = Functions.ConvertDate(SymptomsDR["RecordDate"].ToString()); SymptomInfoItem.RecordTime = Functions.ConvertTime(SymptomsDR["RecordTime"].ToString()); SymptomInfoItem.ReInUserId = SymptomsDR["ReInUserId"].ToString(); if (SymptomInfoItem.ReInUserId == sy.UserId) { SymptomInfoItem.IsAllowed = true; } else { SymptomInfoItem.IsAllowed = false; } sy.SymptomsList.Add(SymptomInfoItem); } }