#region
using System;
using System.Data;
using CSFrameworkV5.Business;
using CSFrameworkV5.Common;
using CSFrameworkV5.Core;
using CSFrameworkV5.Library;
using CSFrameworkV5.Library.CommonClass;
#endregion
namespace CSFrameworkV5.SystemModule
{
public partial class frmModuleMgr : frmBaseDataDictionary
{
public frmModuleMgr()
{
InitializeComponent();
}
protected override void ButtonStateChanged(UpdateType currentState)
{
base.ButtonStateChanged(currentState);
txtModuleID.Enabled = UpdateType.Add == currentState;
}
///
/// 绑定输入框
///
///
protected override void DoBindingSummaryEditor(DataTable summary)
{
DoBindingEditorPanel(gcDetailEditor, summary);
}
private void frmModuleMgr_Load(object sender, EventArgs e)
{
InitializeForm();
}
protected override void InitializeForm()
{
_SummaryView =
new DevGridView(gvSummary); //给成员变量赋值.每个业务窗体必需给这个变量赋值.
_ActiveEditor = txtFileName;
_DetailGroupControl = gcDetailEditor;
_BLL = new bllModuleMgr();
base.InitializeForm();
}
// 检查主表数据是否完整或合法
protected override bool ValidatingData()
{
AssertNull(txtSortID, "序号不能为空!");
AssertNull(txtModuleID, "模块编号不能为空!");
AssertNull(txtFileName, "文件名不能为空!");
AssertNull(txtModuleName, "模块名不能为空!");
if (_UpdateType == UpdateType.Add)
if (_BLL.CheckNoExists(txtModuleID.Text))
{
Msg.Warning("模块编号已存在!");
txtModuleID.Focus();
return false;
}
return true;
}
}
}