Exemple #1
0
 private SqlParamInfo[] GetWindowInfoPars(WindowInfoData roleWindowInfo)
 {
     return(new SqlParamInfo[] {
         new SqlParamInfo("窗体ID", DbType.String, roleWindowInfo.窗体ID),
         new SqlParamInfo("科室ID", DbType.String, roleWindowInfo.科室ID),
         new SqlParamInfo("窗体名称", DbType.String, roleWindowInfo.窗体名称),
         new SqlParamInfo("分组标记", DbType.String, roleWindowInfo.分组标记),
         new SqlParamInfo("窗体信息", DbType.String, roleWindowInfo.窗体信息.ToString())
     });
 }
Exemple #2
0
        /// <summary>
        /// 更新窗体
        /// </summary>
        /// <param name="hisServerData"></param>
        public void UpdateWindowInfo(WindowInfoData roleWindowInfo)
        {
            SQL sql = SqlHelper.CreateSQL("更新窗体信息", "Update 影像窗体信息 " +
                                          " Set 窗体名称=:窗体名称, 分组标记=:分组标记, 版本=:版本, 窗体信息=:窗体信息 where 窗体ID=:窗体ID");

            SqlParamInfo[] sqlPars = new SqlParamInfo[] { new SqlParamInfo("窗体名称", DbType.String, roleWindowInfo.窗体名称),
                                                          new SqlParamInfo("分组标记", DbType.String, roleWindowInfo.分组标记),
                                                          new SqlParamInfo("版本", DbType.Int32, roleWindowInfo.版本),
                                                          new SqlParamInfo("窗体信息", DbType.String, roleWindowInfo.窗体信息.ToString()),
                                                          new SqlParamInfo("窗体ID", DbType.String, roleWindowInfo.窗体ID) };
            sql.AddParameterRange(sqlPars);

            _dbHelper.ExecuteSQL(sql);
        }
Exemple #3
0
        /// <summary>
        /// 新增窗体信息
        /// </summary>
        /// <param name="hisServerData"></param>
        /// <returns></returns>
        public bool NewWindow(WindowInfoData roleWindowInfo)
        {
            SQL sql = SqlHelper.CreateSQL("插入窗体信息", "insert into " +
                                          " 影像窗体信息(窗体ID,科室ID,窗体名称, 分组标记, 窗体信息) " +
                                          " values " +
                                          " (:窗体ID,:科室ID,:窗体名称, :分组标记, :窗体信息)");

            SqlParamInfo[] sqlPars = GetWindowInfoPars(roleWindowInfo);
            sql.AddParameterRange(sqlPars);

            DataTable dtResult = _dbHelper.ExecuteSQL(sql);

            return(true);
        }
Exemple #4
0
        public WindowInfoData GetRoleMainWindowInfo(string roleId)
        {
            SQL sql = SqlHelper.CreateSQL("查询角色主窗体信息", "select b.窗体ID,b.窗体名称,b.分组标记,b.版本,b.窗体信息 " +
                                          " from 影像角色信息 a, 影像窗体信息 b " +
                                          " where a.窗体id = b.窗体id and a.角色id =:角色ID");

            sql.AddParameter("角色ID", DbType.String, roleId);

            DataTable dtWindow = _dbHelper.ExecuteSQL(sql);

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

            WindowInfoData windowInfo = new WindowInfoData();

            windowInfo.BindRowData(dtWindow.Rows[0]);

            return(windowInfo);
        }
Exemple #5
0
        /// <summary>
        /// 根据名称获取窗体信息
        /// </summary>
        /// <param name="windowName"></param>
        /// <param name="departmentId"></param>
        /// <returns></returns>
        public WindowInfoData GetWindowInfoByName(string windowName, string departmentId)
        {
            SQL sql = SqlHelper.CreateSQL("根据窗体名称查询窗体信息", "select 窗体ID,窗体名称,分组标记,版本,窗体信息 " +
                                          " from 影像窗体信息" +
                                          " where 科室id =:科室ID and 窗体名称=:窗体名称");

            sql.AddParameter("科室id", DbType.String, departmentId);
            sql.AddParameter("窗体名称", DbType.String, windowName);

            DataTable dtWindow = _dbHelper.ExecuteSQL(sql);

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

            WindowInfoData windowInfo = new WindowInfoData();

            windowInfo.BindRowData(dtWindow.Rows[0]);

            return(windowInfo);
        }