init lserp cs 5.0
This commit is contained in:
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data.Common;
|
||||
using System.Data.Linq;
|
||||
using System.Linq;
|
||||
using System.Diagnostics;
|
||||
using System.Collections;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
using DevExpress.XtraGrid;
|
||||
using DevExpress.XtraGrid.Views.Grid;
|
||||
using DevExpress.XtraGrid.Columns;
|
||||
using DevExpress.Utils;
|
||||
using DevExpress.XtraEditors;
|
||||
using DevExpress.XtraEditors.Repository;
|
||||
using DevExpress.XtraEditors.Controls;
|
||||
|
||||
using ExcelPlus;
|
||||
using CommonLib;
|
||||
using CommonLib.utils;
|
||||
using Lskj.Common;
|
||||
using CommonLib.data;
|
||||
using System.Reflection;
|
||||
using Lskj.MyControl;
|
||||
using DevExpress.XtraTab;
|
||||
using DevExpress.Data;
|
||||
|
||||
namespace Lskj.PubPageModuleDetail
|
||||
{
|
||||
public partial class FrmMain : FormBase
|
||||
{
|
||||
public string ModuleDllId;
|
||||
|
||||
#region 构造函数
|
||||
public FrmMain()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 初始化数据
|
||||
private void FrmGridTree_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.Text = FormText;
|
||||
this.DLLCoid = string.IsNullOrEmpty(ModuleDllId) ? DLLCoid : ModuleDllId;
|
||||
|
||||
// 加载默认tabPage
|
||||
TabPageContainer container = new TabPageContainer(OperatorId, OperatorName, DLLCoid, FormText, Privilege);
|
||||
container.baseForm = this;
|
||||
container.Dock = DockStyle.Fill;
|
||||
|
||||
XtraTabPage tabPage = new XtraTabPage();
|
||||
tabPage.Text = FormText;
|
||||
tabPage.Controls.Add(container);
|
||||
|
||||
this.tabTopMain.TabPages.Add(tabPage);
|
||||
|
||||
// 加载其它tabPage
|
||||
string sqlValue = string.Format("select * from p_SystemdllTabAttach where tab='{0}' and isVisible=0 order by orderid", DLLCoid);
|
||||
DataTable dtTable = SqlHelper.ExecuteDataSet(sqlValue).Tables[0];
|
||||
foreach (DataRow item in dtTable.Rows)
|
||||
{
|
||||
string unionText = item["AttachName"] + "";
|
||||
string unionMenuId = item["unionModule"] + "";
|
||||
|
||||
TabPageContainer itemContainer = new TabPageContainer(OperatorId, OperatorName, unionMenuId, unionText, Privilege);
|
||||
itemContainer.baseForm = this;
|
||||
itemContainer.Dock = DockStyle.Fill;
|
||||
|
||||
XtraTabPage itemTabPage = new XtraTabPage();
|
||||
itemTabPage.Text = unionText;
|
||||
itemTabPage.Controls.Add(itemContainer);
|
||||
|
||||
this.tabTopMain.TabPages.Add(itemTabPage);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 窗体关闭事件
|
||||
protected override void OnClosed(EventArgs e)
|
||||
{
|
||||
base.OnClosed(e);
|
||||
if (PubUtil.ModuleForms.ContainsKey(ModuleId))
|
||||
{
|
||||
DllModule dm = PubUtil.ModuleForms[ModuleId];
|
||||
if (dm != null)
|
||||
{
|
||||
dm.ModuleForm = null;
|
||||
dm.ModuleInPtr = IntPtr.Zero;
|
||||
PubUtil.ModuleForms.Remove(ModuleId);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user