69 lines
1.9 KiB
C++
69 lines
1.9 KiB
C++
#if !defined(__SYSTREEGRID_H__)
|
|
#define __SYSTREEGRID_H__
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "BaseTreeGrid.h"
|
|
|
|
// 系统设置表格
|
|
class CWSysTreeGrid : public CBaseTreeGrid
|
|
{
|
|
public:
|
|
CWSysTreeGrid();
|
|
virtual ~CWSysTreeGrid();
|
|
|
|
public:
|
|
// 创建新的行
|
|
BOOL InsertNewTreeRow(CUIIValueTable &vTable, const Ttable& arFieldName, LPCTSTR pszParent);
|
|
BOOL InsertNewTreeRow(CUIIValueTable &vTable, const CStringArray& lstFieldName, LPCTSTR pszParName);
|
|
BOOL InsertChildTreeRow(WDGridTreeRow* pParentRow, CUIIValueTable &vTable, const Ttable& arFieldName);
|
|
BOOL InsertChildTreeRow(WDGridTreeRow* pParentRow, CUIIValueTable &vTable, const CStringArray& arFieldName);
|
|
|
|
// 根据数据库中的关键字,找到对应的表格列序号; SYSTEM_KEY 所属系统,LAYCODE_KEY 图层代号
|
|
BOOL GetGridIndex(LPCTSTR pszDBKey, int &iIndexCol);
|
|
|
|
// 限制单元个操作
|
|
BOOL SetCellGrade(WDGridCell& cell);
|
|
|
|
// 判断系统名称是否存在,返回的新的系统名称
|
|
CString GetNewSysName(LPCTSTR pszSys);
|
|
|
|
// 插入行
|
|
virtual void OnInsertRow(WDGridRow &row);
|
|
|
|
// 删除行
|
|
virtual bool OnBeforeDeleteRow();
|
|
virtual void OnEndDeleteRow();
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
|
|
|
// 移动行, 不让其移动,容易崩溃
|
|
virtual bool OnMoveRow(long i);
|
|
virtual void OnEndMoveRow();
|
|
|
|
// 单元格combox加载数据
|
|
virtual void OnCellComboString(WDGridCell &wdCell, CComboBox &combo);
|
|
|
|
// 刷新单元格
|
|
virtual bool OnRefresh(WDGridCell& wdCell);
|
|
|
|
// 编辑单元格
|
|
virtual WCellCtrl* OnGetCellEdit(WDGridCell&cell);
|
|
virtual bool OnModified(WDGridCell&cell,CString&text);
|
|
|
|
// combo下拉列表选择变化
|
|
virtual void OnCmbSelchange(WDGridCell& cell, CComboBox* pCmb);
|
|
|
|
// 按钮
|
|
virtual bool OnCellButtonDown(WDGridCell& cell, CString& res);
|
|
|
|
public:
|
|
Ttable m_arField; // 系统设置数据库结构
|
|
CUIIValueTable m_tabModel; // 系统设置树形行的模板
|
|
CUIIValueTable m_tabLineType; // 线型表
|
|
CStringArray m_arDuctMat; // 风管材料 ywb 2009-2-23
|
|
};
|
|
|
|
#endif // !defined(__SYSTREEGRID_H__)
|