コード例 #1
0
ファイル: CommonController.cs プロジェクト: iJzFan/backup
 public dynamic JetDoctorOfStation(int?stationId, string searchText, int?pageIndex = 1, int?pageSize = 10)
 {
     try
     {
         if (!stationId.HasValue)
         {
             stationId = TryGet <int?>(() => UserSelf.StationId);
         }
         if (!stationId.HasValue)
         {
             throw new Exception("没有找到工作站Id");
         }
         var rlt     = _stationSvr.GetDoctorsOfStation(stationId.Value, searchText, pageIndex.Value, pageSize.Value);
         var station = _stationSvr.Find(stationId.Value);
         var dd      = MyDynamicResult(true, "获取成功");
         dd.station = new
         {
             station.StationName,
             station.StationLat,
             station.StationLng,
             defStationPic = station.DefStationPic.GetUrlPath(Global.ConfigSettings.StationImagePathRoot)
         };
         dd.doctors = rlt;
         return(dd);
     }
     catch (Exception ex) { return(MyDynamicResult(ex)); }
 }
コード例 #2
0
ファイル: NurseController.cs プロジェクト: iJzFan/backup
        public IActionResult Register()
        {
            var treatDeparts = _staSvr.GetTreatDepartmentOfStation(UserSelf.StationId).Select(m => new Ass.KeyValueItem {
                Value = m.DepartmentID, KeyItem = m.DepartmentName
            }).ToList();
            var doctors = _staSvr.GetDoctorsOfStation(UserSelf.StationId, null, 1, 100).Select(m => new Ass.KeyValueItem {
                Value = m.DoctorId, KeyItem = m.DoctorName
            }).ToList();

            ViewBag.Departs = treatDeparts;
            ViewBag.Doctors = doctors;
            return(View());
        }
コード例 #3
0
 public IActionResult GetLoginUsersOfStation(int?stationId, string searchText, int?pageInde = 1, int?pageSize = 20)
 {
     try
     {
         if (UserSelf == null && stationId == null)
         {
             throw new ComException(ExceptionTypes.Error_Unauthorized, "未登录的用户,需要输入参数:stationId");
         }
         stationId = stationId ?? UserSelf.StationId;
         var mdd = _stationSvr.GetDoctorsOfStation(stationId.Value, searchText, pageInde.Value, pageSize.Value);
         var rlt = MyDynamicResult(mdd);
         return(Ok(rlt));
     }
     catch (Exception ex) { return(Ok(MyDynamicResult(ex))); }
 }