Example #1
0
        public UserInfoData GetUserInfoByUserID(string userId)
        {
            SQL sql = SqlHelper.CreateSQL("根据用户ID查询影像用户信息", "select 用户ID,系统账号, 用户名称, 职称级别, 账号信息, 人员信息, 人员照片, 签名图片,变更日志 from 影像用户信息 where 用户ID=:用户ID");

            sql.AddParameter("用户ID", System.Data.DbType.String, userId);

            DataTable dtUser = _dbHelper.ExecuteSQL(sql);

            if (dtUser == null || dtUser.Rows.Count <= 0)
            {
                return(null);
            }

            UserInfoData result = new UserInfoData();

            result.BindRowData(dtUser.Rows[0]);

            return(result);
        }
Example #2
0
        /// <summary>
        /// 根据名称获取用户信息
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        public UserInfoData GetUserInfoByUserName(string userName, string departmentId)
        {
            SQL sql = SqlHelper.CreateSQL("根据用户账号查询影像用户信息", "select a.用户ID,a.系统账号, a.用户名称, a.职称级别, a.账号信息, a.人员信息, a.人员照片, a.签名图片,a.变更日志 " +
                                          " from 影像用户关联 a, 影像用户信息 b where a.用户ID=b.用户ID and a.科室ID=:科室ID and b.用户名称=:用户名称");

            sql.AddParameter("用户名称", System.Data.DbType.String, userName);
            sql.AddParameter("科室ID", System.Data.DbType.String, departmentId);

            DataTable dtUser = _dbHelper.ExecuteSQL(sql);

            if (dtUser == null || dtUser.Rows.Count <= 0)
            {
                return(null);
            }

            UserInfoData result = new UserInfoData();

            result.BindRowData(dtUser.Rows[0]);

            return(result);
        }