| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503 |
- /*******************************************************************************
- * Copyright(c) 2014 DongkeSoft All rights reserved. / Confidential
- * 类的信息:
- * 1.程序名称:F_SYS_0202.cs
- * 2.功能描述:系统导航栏页面
- * 编辑履历:
- * 作者 日期 版本 修改内容
- * 张国印 2014/08/27 1.00 新建
- *******************************************************************************/
- using System;
- using System.Collections.Generic;
- using System.Data;
- using System.Linq;
- using System.Reflection;
- using System.Windows.Forms;
- using Curtain.Helpers;
- using Dongke.IBOSS.PRD.Basics.BaseControls;
- using Dongke.IBOSS.PRD.Basics.BaseResources;
- using Dongke.IBOSS.PRD.Basics.DockPanel;
- using Dongke.IBOSS.PRD.Basics.Library;
- using Dongke.IBOSS.PRD.Client.CommonModule;
- using Dongke.IBOSS.PRD.Client.Controls;
- using Dongke.IBOSS.PRD.Client.DataModels;
- using Dongke.IBOSS.PRD.Client.HRModule;
- using Dongke.IBOSS.PRD.Client.PAMModule;
- using Dongke.IBOSS.PRD.Client.PCModule;
- using Dongke.IBOSS.PRD.Client.PMModule;
- //using Dongke.IBOSS.PRD.Client.PPModule;
- using Dongke.IBOSS.PRD.Client.ReportModule;
- using Dongke.IBOSS.PRD.Client.SAPDataModule;
- using Dongke.IBOSS.PRD.Client.SystemModule;
- using Dongke.IBOSS.PRD.Client.TATModule;
- using Dongke.IBOSS.PRD.WCF.DataModels;
- using Dongke.IBOSS.PRD.WCF.Proxys;
- namespace Dongke.IBOSS.PRD.Client
- {
- /// <summary>
- /// 系统导航栏页面
- /// </summary>
- public partial class F_SYS_0202 : DockPanelBase
- {
- #region 成员变量
- // 主窗体的DockPanel
- private readonly DockPanel _dockPanel = new DockPanel();
- #endregion
- #region 构造函数
- /// <summary>
- /// 构造函数
- /// </summary>
- /// <param name="dockpanel">主窗体的DockPanel控件</param>
- public F_SYS_0202(DockPanel dockpanel)
- {
- InitializeComponent();
- this.SetFromTitleInfo();
- this._dockPanel = dockpanel;
- this.TabPageContextMenuStrip = null;
- }
- #endregion
- #region 事件处理
- /// <summary>
- /// 页面加载事件
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void F_SYS_0202_Load(object sender, EventArgs e)
- {
- // 获取导航栏用户菜单
- DataTable dtTemp = LogInUserInfo.CurrentUser.CurrentUserEntity.UserNavigationData;
- // 返回第一级用户菜单,用于生成对应Button
- //var dicTemp = InitNavigationButtons(dtTemp);
- // 设置导航栏一级菜单 原来带Button 的菜单 一级菜单多了容易兑死
- //this.tvwNavigation.SetMenuDictionart(dicTemp);
- // 纯树形菜单
- this.InitNavigationTreeView(dtTemp);
- }
- /// <summary>
- /// 刷新树
- /// </summary>
- public void RefreshViewTree()
- {
- LogInUserInfo.CurrentUser.SysParameter.Clear();
- LogInUserInfo.CurrentUser.SysParameter.AcceptChanges();
- LoginRequestEntity requestEntity = new LoginRequestEntity();
- requestEntity.AccountCode = LogInUserInfo.CurrentUser.CurrentUserEntity.AccountCode;
- requestEntity.UserCode = LogInUserInfo.CurrentUser.CurrentUserEntity.UserCode;
- requestEntity.Password = LogInUserInfo.CurrentUser.CurrentUserEntity.Password;
- requestEntity.IPAddress = SystemAPI.IPAddress;
- requestEntity.MACAddress = SystemAPI.MacAddress;
- requestEntity.ComputerName = SystemAPI.ComputerName;
- LoginResultEntity result = (LoginResultEntity)DoAsync(new AsyncMethod(() =>
- {
- return DKIBOSSPRDProxy.Service.DoLoginRefresh(requestEntity);
- }));
- Dongke.IBOSS.PRD.Client.DataModels.UserEntity userEntity =
- new Dongke.IBOSS.PRD.Client.DataModels.UserEntity();
- DataConvert.Convert(result.CurrentUserEntity, userEntity);
- LogInUserInfo tempUser = new LogInUserInfo(userEntity, result.LicenseInfo,
- result.SysParameter);
- }
- /// <summary>
- /// 根据传入的ID生成对应的导航树
- /// </summary>
- /// <param name="appID">用户选择的菜单编号</param>
- /// <returns></returns>
- private TreeNode dkButtonTreeView1_GetTreeViewNodes(string appID)
- {
- DataTable sysList = LogInUserInfo.CurrentUser.CurrentUserEntity.UserNavigationData.Copy();
- // 递归生成功能权限树
- DataRow nodeRoot = sysList.Select("FunctionCode = '" + appID + "'").FirstOrDefault();
- if (nodeRoot != null)
- {
- TreeNode node = new TreeNode();
- node.Text = nodeRoot["FunctionName"].ToString();
- node.Name = nodeRoot["FunctionCode"].ToString();
- if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(nodeRoot["FunctionFlag"].ToString().Trim()))
- {
- node.ImageIndex = Constant.INT_IS_ONE;
- node.SelectedImageIndex = Constant.INT_IS_ONE;
- }
- DataRow[] navigationRows = sysList.Select("FunctionCode LIKE '" + appID
- + "%' AND " + "LEN(FunctionCode) = " + Constant.INT_IS_FOUR.ToString());
- this.InitTreeView(sysList, navigationRows, node);
- return node;
- }
- else
- {
- return null;
- }
- }
- /// <summary>
- /// 层叠树的节点时触发
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_AfterCollapse(object sender, TreeViewEventArgs e)
- {
- e.Node.SelectedImageIndex = Constant.INT_IS_ZERO;
- e.Node.ImageIndex = Constant.INT_IS_ZERO;
- }
- /// <summary>
- /// 展开树的节点时触发
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_AfterExpand(object sender, TreeViewEventArgs e)
- {
- e.Node.SelectedImageIndex = Constant.INT_IS_TWO;
- e.Node.ImageIndex = Constant.INT_IS_TWO;
- }
- /// <summary>
- /// 用户双击导航树时触发
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_DoubleClick(object sender, EventArgs e)
- {
- try
- {
- if (sender != null)
- {
- if (sender is TreeView)
- {
- if (((TreeView)sender).SelectedNode != null)
- {
- //xuwei add 2020-01-03 如果定义了url 跳转到url 用于转到webmes
- if(((TreeView)sender).SelectedNode.Tag is object)
- {
- string tag = ((TreeView)sender).SelectedNode.Tag.ToString();
- string title = ((TreeView)sender).SelectedNode.Text.ToString();
- if (tag!="" & tag!=",,,")
- {
- //静态配置
- //string goUrl = "http://192.168.0.237:9000/mes/mesgo.ashx";
- //从配置文件读取
- string goUrl = "http://" + Utility.ReadIniFile(Constant.INI_SECTION_NET, Constant.INI_KEY_IP, AppDomain.CurrentDomain.BaseDirectory + Constant.INI_FILE_NAME) + ":9000/mes/mesgo.ashx";
- string[] tagArray = tag.Split(',');
- if (tagArray.Length == 1 && tagArray[0].ToString() != "")
- System.Diagnostics.Process.Start(goUrl + "?go=" + tagArray[0] + "&title=" + title + "&sessionkey=" + LogInUserInfo.CurrentUser.SessionKey);
- if (tagArray.Length == 4 && tagArray[3].ToString() != "")
- System.Diagnostics.Process.Start(goUrl + "?go=" + tagArray[3] + "&title=" + title + "&sessionkey=" + LogInUserInfo.CurrentUser.SessionKey);
- }
- }
- //xuwei end
- switch (((TreeView)sender).SelectedNode.Name.ToString())
- {
- #region 01-系统管理
- case "01":
- //系统管理
- break;
- #region 系统管理-帐套信息
- case "0101":
- //系统管理-帐套信息
- break;
- case "010101":
- //系统管理-帐套信息-帐套管理
- F_MST_0001 frmAccount = new F_MST_0001();
- frmAccount.ShowDialog();
- break;
- #endregion
- #region 系统管理-用户及组织
- case "0102":
- //系统管理-用户及组织
- break;
- case "010201":
- //系统管理-用户及组织-组织机构
- this.ShowInDockPanel(F_MST_0101.Instance);
- break;
- case "010202":
- //系统管理-用户及组织-用户管理
- this.ShowInDockPanel(F_MST_0201.Instance);
- break;
- case "010203":
- case "010403":
- //系统管理-用户及组织-关联员工
- this.ShowInDockPanel(F_MST_0210.Instance);
- break;
- case "010204":
- //系统管理-用户及组织-功能权限
- F_MST_0206 frm0206 = new F_MST_0206();
- frm0206.ShowDialog();
- break;
- case "010205":
- //系统管理-用户及组织-范围权限
- F_MST_0207 frm0207 = new F_MST_0207();
- frm0207.ShowDialog();
- break;
- case "010206":
- //系统管理-用户及组织-登录记录
- this.ShowInDockPanel(F_MST_0208.Instance);
- break;
- #endregion
- #region 系统管理-产品信息
- case "0103":
- //系统管理-产品信息
- break;
- case "010301":
- //系统管理-产品信息-产品类别
- F_MST_0405 mst0405 = new F_MST_0405();
- mst0405.ShowDialog();
- break;
- case "010302":
- //系统管理-产品信息-釉料类别
- break;
- case "010303":
- //系统管理-产品信息-产品档案
- this.ShowInDockPanel(F_MST_0501.Instance);
- break;
- case "010304":
- //系统管理-产品信息-产品缺陷
- this.ShowDialogForm(F_MST_0407.Instance);
- break;
- case "010305":
- //系统管理-产品信息-缺陷位置
- this.ShowDialogForm(F_MST_0409.Instance);
- break;
- case "010306":
- //系统管理-产品信息-产品分级
- this.ShowDialogForm(F_MST_0408.Instance);
- break;
- case "010307":
- //系统管理-产品信息-缺陷类别
- F_MST_0411 mst0411 = new F_MST_0411();
- mst0411.ShowDialog();
- break;
- case "010308":
- //系统管理-产品信息-半成品缺陷
- F_MST_1001 mst1001 = new F_MST_1001();
- mst1001.ShowDialog();
- break;
- case "010309":
- //系统管理-产品信息-半成品缺陷位置
- F_MST_1002 mst1002 = new F_MST_1002();
- mst1002.ShowDialog();
- break;
- case "010310":
- //系统管理-产品信息-金蝶代码对应
- ShowInDockPanel(F_MST_1301.Instance);
- break;
- case "010311":
- //系统管理-产品信息-模具产品对应
- ShowInDockPanel(F_MST_1401.Instance);
- break;
- #endregion
- #region 系统管理-HR基础数据
- case "0104":
- //系统管理-HR基础数据
- break;
- case "010401":
- //系统管理-HR基础数据-工种
- this.ShowDialogForm(F_MST_0403.Instance);
- break;
- case "010402":
- //系统管理-HR基础数据-职务
- this.ShowDialogForm(F_MST_0404.Instance);
- break;
- #endregion
- #region 系统管理-生产基础数据
- case "0105":
- //系统管理-生产基础数据
- break;
- case "010501":
- //系统管理-生产基础数据-窑炉
- this.ShowDialogForm(F_MST_0301.Instance);
- break;
- case "010502":
- //系统管理-生产基础数据-窑车
- this.ShowDialogForm(F_MST_0302.Instance);
- break;
- case "010503":
- //系统管理-生产基础数据-成型线类型
- this.ShowDialogForm(F_MST_0410.Instance);
- break;
- case "010504":
- //系统管理-生产基础数据-温湿度管理
- this.ShowInDockPanel(F_MST_0601.Instance);
- break;
- case "010510":
- //系统管理-生产基础数据-成型破损原因
- this.ShowDialogForm(F_PM_0906.Instance);
- break;
- #endregion
- #region 系统管理-系统字典
- case "0106":
- //系统管理-系统字典
- this.ShowDialogForm(F_MST_0402.Instance);
- break;
- #endregion
- #region 系统管理-系统设置
- case "0107":
- //系统管理-系统设置
- break;
- case "010701":
- //系统管理-系统设置-系统参数
- this.ShowDialogForm(F_MST_0401.Instance);
- break;
- case "010702":
- //系统管理-系统设置-票据设置
- break;
- #endregion
- #region 系统管理-报表工序
- case "0108":
- //系统管理-报表工序
- this.ShowInDockPanel(F_MST_0701.Instance);
- break;
- #endregion
- #region 系统管理-工艺管理
- case "0109":
- //系统管理-工艺部门
- this.ShowDialogForm(F_MST_1101.Instance);
- break;
- case "0110":
- //系统管理-工艺配置
- this.ShowInDockPanel(F_MST_1102.Instance);
- break;
- case "0111":
- //系统管理-条码打印模板
- this.ShowInDockPanel(F_MST_012001.Instance);
- break;
- case "0115":
- //系统管理-模具标签模板
- this.ShowInDockPanel(F_MST_013001.Instance);
- break;
- case "0112":
- //系统管理-工号分组
- this.ShowInDockPanel(F_MST_1201.Instance);
- break;
- case "0113":
- //系统管理-条码打印机
- this.ShowDialogForm(F_MST_0412.Instance);
- break;
- case "0114":
- //系统管理-PLC连接参数
- this.ShowDialogForm(F_MST_0413.Instance);
- break;
- #endregion
- case "010505":
- //系统管理-商标管理
- F_MST_0801 mst0801 = new F_MST_0801();
- mst0801.ShowDialog();
- break;
- case "010506":
- //系统管理-缺陷扣罚管理
- F_MST_0901 mst0901 = new F_MST_0901();
- mst0901.ShowDialog();
- break;
- case "010507":
- //系统管理-缺陷扣除数管理
- F_MST_0902 mst0902 = new F_MST_0902();
- mst0902.ShowDialog();
- break;
- case "010508":
- //系统管理-缺陷关系设置
- F_MST_0903 mst0903 = new F_MST_0903();
- mst0903.ShowDialog();
- break;
- case "010509":
- //系统管理-模具材料供应商
- F_MST_0414 mst0414 = new F_MST_0414();
- mst0414.ShowDialog();
- break;
- #endregion
- #region 02-策略管理
- case "02":
- //策略管理
- break;
- #region 策略管理-工资考核策略
- case "0201":
- //策略管理-工资考核策略
- break;
- case "020101":
- //策略管理-工资考核策略-基本工资策略
- this.ShowInDockPanel(F_TAT_0301.Instance);
- break;
- case "020102":
- //策略管理-工资考核策略-管理岗位工资策略
- this.ShowInDockPanel(F_TAT_0701.Instance);
- break;
- case "020103":
- //策略管理-工资考核策略-工价策略
- this.ShowInDockPanel(F_TAT_0201.Instance);
- break;
- case "020104":
- //策略管理-工资考核策略-出勤考核
- this.ShowInDockPanel(F_TAT_0801.Instance);
- break;
- case "020105":
- //策略管理-工资考核策略-质量考核
- this.ShowInDockPanel(F_TAT_0401.Instance);
- break;
- case "020106":
- //策略管理-工资考核策略-进度考核
- this.ShowInDockPanel(F_TAT_0501.Instance);
- break;
- case "020107":
- //策略管理-工资考核策略-缺陷扣罚策略
- this.ShowInDockPanel(F_TAT_0101.Instance);
- break;
- case "020108":
- //策略管理-工资考核策略-缺陷扣罚策略
- this.ShowInDockPanel(F_TAT_0601.Instance);
- break;
- #endregion
- #region 策略管理-工资管理策略
- case "020201":
- //策略管理-工资管理策略-工资方案参数设定
- this.ShowInDockPanel(F_PAM_0101.Instance);
- break;
- case "020202":
- //策略管理-工资管理策略-工种工资方案
- this.ShowInDockPanel(F_PAM_0102.Instance);
- break;
- case "020203":
- //策略管理-工资管理策略-工价分类
- this.ShowDialogForm(F_PAM_0202.Instance);
- break;
- case "020204":
- //策略管理-工资管理策略-产品工价分类
- this.ShowInDockPanel(F_PAM_0201.Instance);
- //this.ShowInDockPanel(F_PAM_0601.Instance);
- break;
- case "020205":
- //策略管理-工资管理策略-计件工资策略
- this.ShowInDockPanel(F_PAM_0301.Instance);
- break;
- case "020206":
- //策略管理-工资管理策略-品质考核策略
- this.ShowInDockPanel(F_PAM_0401.Instance);
- break;
- case "020207":
- //策略管理-工资管理策略-工资结算
- this.ShowInDockPanel(F_PAM_0601.Instance);
- break;
- #endregion
- #endregion
- #region 03-人力资源
- case "03":
- //人力资源
- break;
- #region 人力资源-员工管理
- case "0301":
- //人力资源-员工管理
- break;
- case "030101":
- //人力资源-员工管理-员工档案
- this.ShowInDockPanel(F_HR_0101.Instance);
- break;
- case "030102":
- //人力资源-员工管理-员工入职
- this.ShowInDockPanel(F_HR_0201.Instance);
- break;
- case "030103":
- //人力资源-员工管理-员工转正
- this.ShowInDockPanel(F_HR_0301.Instance);
- break;
- case "030104":
- //人力资源-员工管理-员工离职
- this.ShowInDockPanel(F_HR_0401.Instance);
- break;
- case "030105":
- //人力资源-员工管理-工种调整
- this.ShowInDockPanel(F_HR_0501.Instance);
- break;
- case "030106":
- //人力资源-员工管理-职务调整
- this.ShowInDockPanel(F_HR_0601.Instance);
- break;
- case "030107":
- //人力资源-员工管理-部门调整
- this.ShowInDockPanel(F_HR_0701.Instance);
- break;
- #endregion
- #region 人力资源-人事审批
- case "0302":
- //人力资源-人事审批
- break;
- case "030201":
- //人力资源-人事审批-员工入职
- this.ShowInDockPanel(F_HR_0203.Instance);
- break;
- case "030202":
- //人力资源-人事审批-员工转正
- this.ShowInDockPanel(F_HR_0303.Instance);
- break;
- case "030203":
- //人力资源-人事审批-员工离职
- this.ShowInDockPanel(F_HR_0403.Instance);
- break;
- case "030204":
- //人力资源-人事审批-工种调整
- this.ShowInDockPanel(F_HR_0503.Instance);
- break;
- case "030205":
- //人力资源-人事审批-职务调整
- this.ShowInDockPanel(F_HR_0603.Instance);
- break;
- case "030206":
- //人力资源-人事审批-部门调整
- this.ShowInDockPanel(F_HR_0703.Instance);
- break;
- #endregion
- #region 人力资源-行政管理
- case "0303":
- //人力资源-行政管理
- break;
- case "030301":
- //人力资源-行政管理-员工报餐
- this.ShowInDockPanel(F_HR_0901.Instance);
- break;
- case "030302":
- //人力资源-行政管理-员工考勤
- this.ShowInDockPanel(F_HR_1001.Instance);
- break;
- case "030303":
- //人力资源-行政管理-行政考核
- this.ShowInDockPanel(F_PAM_0501.Instance);
- break;
- case "030304":
- //人力资源-行政管理-行政考核审核
- this.ShowInDockPanel(F_PAM_0503.Instance);
- break;
- #endregion
- #region 人力资源-奖惩管理
- case "0304":
- //人力资源-奖惩管理
- break;
- case "030401":
- //人力资源-奖惩管理-进度奖惩
- this.ShowInDockPanel(F_PM_1104.Instance);
- break;
- case "030402":
- //人力资源-奖惩管理-行政奖惩
- this.ShowInDockPanel(F_HR_1101.Instance);
- break;
- case "030403":
- //人力资源-奖惩管理-行政奖惩审批
- this.ShowInDockPanel(F_HR_1103.Instance);
- break;
- case "030404":
- //人力资源-奖惩管理-进度奖惩审批
- this.ShowInDockPanel(F_PM_1106.Instance);
- break;
- #endregion
- #region 人力资源-工资管理
- case "0305":
- //人力资源-工资管理
- break;
- case "030501":
- //人力资源-工资管理-工资结算
- this.ShowInDockPanel(F_HR_1201.Instance);
- break;
- case "030502":
- //人力资源-工资管理-工资审批
- break;
- case "030503":
- //人力资源-工资管理-工资结算
- this.ShowInDockPanel(F_PAM_0601.Instance);
- break;
- case "030504":
- //人力资源-工资管理-工资调整
- this.ShowInDockPanel(F_PAM_0603.Instance);
- break;
- case "030505":
- //人力资源-工资管理-工资审批
- this.ShowInDockPanel(F_PAM_0604.Instance);
- break;
- #endregion
- #endregion
- #region 04-生产配置
- case "04":
- //生产配置
- break;
- #region 生产配置-成型线管理
- case "0401":
- //生产配置-成型线管理
- //this.ShowInDockPanel(F_PC_0104.Instance);
- this.ShowInDockPanel(F_PC_0104_1.Instance);
- //生产配置-生产模具管理
- break;
- case "0402":
- //生产配置-生产模具管理
- //this.ShowInDockPanel(F_PC_0101.Instance);
- this.ShowInDockPanel(F_PC_0101_1_1.Instance);
- break;
- case "0403":
- //生产配置-生产线配置
- //this.ShowInDockPanel(F_PC_0201.Instance);
- this.ShowInDockPanel(F_PC_0205.Instance);
- break;
- case "0404":
- //生产配置-班次配置
- this.ShowInDockPanel(F_PC_0401.Instance);
- break;
- case "0405":
- //生产配置-员工关联
- this.ShowInDockPanel(F_PC_0601.Instance);
- break;
- #endregion
- #endregion
- #region M04-模具管理
- case "M0401":
- // 模具管理-模具档案
- this.ShowInDockPanel(F_PC_1001.Instance);
- break;
- case "M0402":
- // 模具管理-模具盘点
- this.ShowInDockPanel(F_PC_1101.Instance);
- break;
- case "M0403":
- // 模具管理-模具库存结转
- this.ShowInDockPanel(F_PC_1201.Instance);
- break;
- #endregion
- #region 06-生产管理
- case "06":
- //生产管理
- break;
- #endregion
- #region 07-综合报表
- #region 明细表
- case "070401":
- //注浆明细表
- this.ShowInDockPanel(F_RPT_010101_1.Instance);
- break;
- case "070402":
- //半检明细表
- this.ShowInDockPanel(F_RPT_010102_1.Instance); //
- break;
- case "070403":
- //漏扫数据统计
- this.ShowInDockPanel(F_RPT_010201_1.Instance);
- break;
- case "070404":
- //条码变更
- this.ShowInDockPanel(F_RPT_010301_1.Instance);
- break;
- case "070407":
- //交坯明细
- this.ShowInDockPanel(F_RPT_010103.Instance);
- break;
- case "070408":
- //注浆次数明细
- this.ShowInDockPanel(F_RPT_010104.Instance);
- break;
- case "070415":
- //成型线模具使用明细表
- this.ShowInDockPanel(F_RPT_010105.Instance);
- break;
- case "070416":
- //成型线剩余注浆次数
- this.ShowInDockPanel(F_RPT_010106.Instance);
- break;
- case "070409":
- //历史模具明细表
- this.ShowInDockPanel(F_RPT_080101.Instance);
- break;
- case "070410":
- //工序产量明细表
- this.ShowInDockPanel(F_RPT_080105.Instance);
- break;
- case "070411":
- //成型线明细表
- this.ShowInDockPanel(F_PC_0108.Instance);
- break;
- case "070413":
- //生产数据明细表
- this.ShowInDockPanel(F_RPT_010403.Instance);
- break;
- case "070414":
- //半检登记明细表
- this.ShowInDockPanel(F_RPT_080107.Instance);
- break;
- case "070701":
- //
- this.ShowInDockPanel(F_RPT_080102.Instance);
- break;
- case "070702":
- //
- this.ShowInDockPanel(F_RPT_080103.Instance);
- break;
- case "070703":
- //
- this.ShowInDockPanel(F_RPT_080104.Instance);
- break;
- case "070412":// 温湿计明细表
- //
- this.ShowInDockPanel(F_RPT_080106.Instance);
- break;
- case "070417":// 商标变更明细表
- //
- this.ShowInDockPanel(F_RPT_010302.Instance);
- break;
- case "070418":
- // 产品损坯明细表
- this.ShowInDockPanel(F_RPT_010202.Instance);
- break;
- case "070419":
- // 在产品备份表
- this.ShowInDockPanel(F_RPT_010404.Instance);
- break;
- case "070420":
- // 产成品单值明细表
- this.ShowInDockPanel(F_RPT_010405.Instance);
- break;
- //xuwei begin add 2019-10-14
- case "070421":
- //半检返修登记明细表
- this.ShowInDockPanel(F_RPT_080108.Instance);
- break;
- //xuwei end
- #endregion
- #region 跟踪表
- case "070301":
- //产品统计-产品跟踪表
- this.ShowInDockPanel(F_RPT_020101_1.Instance);
- break;
- case "070302":
- //产品统计-窑车状态表
- this.ShowInDockPanel(F_RPT_020104.Instance);
- break;
- case "070303":
- // 模具跟踪表
- this.ShowInDockPanel(F_RPT_020105.Instance);
- break;
- #endregion
- #region 汇总表
- case "070601":
- //产品损坏汇总表
- this.ShowInDockPanel(F_RPT_030102_1.Instance);
- break;
- case "070602":
- //产品产量汇总表
- this.ShowInDockPanel(F_RPT_030101_1.Instance);
- break;
- case "070603":
- //出窑数量汇总表
- this.ShowInDockPanel(F_RPT_030103_1.Instance);
- break;
- case "070604":
- //窑车产量汇总表
- this.ShowInDockPanel(F_RPT_030104_1.Instance);
- break;
- case "070605":
- //生产统计-成型线变产记录
- this.ShowInDockPanel(F_PC_0501.Instance);
- break;
- case "070606":
- //在产产量汇总表
- this.ShowInDockPanel(F_RPT_030105.Instance);
- break;
- case "070607":
- //成检缺陷汇总表
- this.ShowInDockPanel(F_RPT_030106.Instance);
- break;
- case "070608":
- //工序交接数量汇总表
- this.ShowInDockPanel(F_RPT_030107.Instance);
- break;
- case "070609":
- //成型信息汇总表
- this.ShowInDockPanel(F_RPT_030108.Instance);
- break;
- case "070610":
- //撤销产品汇总表
- this.ShowInDockPanel(F_RPT_030109.Instance);
- break;
- case "070611":
- //半检信息汇总表
- this.ShowInDockPanel(F_RPT_030110.Instance);
- break;
- case "070612":
- //工序收发存汇总表
- this.ShowInDockPanel(F_RPT_030111.Instance);
- break;
- case "070713":
- //产成品交接汇总表
- this.ShowInDockPanel(F_RPT_030112.Instance);
- break;
- case "070714":
- // 模具收发存汇总表
- this.ShowInDockPanel(F_RPT_030113.Instance);
- break;
- case "070715":
- // 废弃产品汇总表
- this.ShowInDockPanel(F_RPT_030114.Instance);
- break;
- case "070716":
- // 工艺废弃产品汇总表
- this.ShowInDockPanel(F_RPT_030115.Instance);
- break;
- case "070717":
- // 成型存坯汇总表
- this.ShowInDockPanel(F_RPT_030116.Instance);
- break;
- case "070718":
- // 产成品交接撤销汇总表
- this.ShowInDockPanel(F_RPT_030117.Instance);
- break;
- case "070719":
- // 年度各工序月产量统计表
- this.ShowInDockPanel(F_RPT_030118.Instance);
- break;
- case "070720":
- // 半检返修缺陷汇总表
- this.ShowInDockPanel(F_RPT_030119.Instance);
- break;
- #endregion
- #region 分析表
- case "070501":
- //注浆交坯比率分析表
- this.ShowInDockPanel(F_RPT_040101_1.Instance);
- break;
- case "070502":
- //工序产量分析表
- this.ShowInDockPanel(F_RPT_040102_1.Instance);//注释日期 20150608
- break;
- case "070503":
- //注浆产品工序分析表
- this.ShowInDockPanel(F_RPT_040107.Instance);
- break;
- case "070504":
- //成型线产量分析表
- this.ShowInDockPanel(F_RPT_040108.Instance);
- break;
- case "070505":
- //整体质量分析表
- this.ShowInDockPanel(F_RPT_040109.Instance);
- break;
- case "070506":
- //产成品逐日出窑数值分析表
- this.ShowInDockPanel(F_RPT_040110.Instance);
- break;
- case "070507":
- //模具注浆分析表
- this.ShowInDockPanel(F_RPT_040111.Instance);
- break;
- case "070508":
- //成检产品预算分析表
- this.ShowInDockPanel(F_RPT_040112.Instance);
- break;
- case "070203":
- //产品统计-工序质量分析表
- this.ShowInDockPanel(F_RPT_040103.Instance);
- break;
- case "070205":
- //产成品质量分析表
- this.ShowInDockPanel(F_RPT_040104.Instance);
- // this.ShowInDockPanel(F_RPT_080101.Instance);
- break;
- case "080109":
- // 半成检缺陷对照表(潮州)
- this.ShowInDockPanel(F_RPT_080109.Instance);
- break;
- #endregion
- #region 质量报表
- case "040105":
- this.ShowInDockPanel(F_RPT_040105.Instance);
- break;
- case "040106":
- this.ShowInDockPanel(F_RPT_040106.Instance);
- break;
- case "040113":
- // 各工序质量表
- this.ShowInDockPanel(F_RPT_040113.Instance);
- break;
- case "070509":
- // 综合合格率分析表
- this.ShowInDockPanel(F_RPT_040114.Instance);
- break;
- #endregion
- #endregion
- #region 生产管理-注浆管理
- case "0601":
- //生产管理-注浆管理
- break;
- case "060101":
- //生产管理-注浆管理-注浆登记
- this.ShowInDockPanel(F_PM_0101.Instance);
- break;
- case "060102":
- //生产管理-注浆管理-注浆日报
- this.ShowInDockPanel(F_RPT_010101_1.Instance);
- break;
- case "060103":
- //生产管理-注浆管理-环境登记
- this.ShowInDockPanel(F_PM_1701.Instance);
- break;
- case "060104":
- //生产管理-注浆管理-环境日报
- this.ShowDialogForm(new F_PM_1802());
- break;
- case "060105":
- //生产管理-注浆管理-注浆变更
- this.ShowDialogForm(new F_PM_2105());
- break;
- case "060106":
- //生产管理-注浆管理-成型报损
- this.ShowInDockPanel(F_PM_2701.Instance);
- break;
- case "060107":
- //生产管理-注浆管理-撤销报损
- this.ShowDialogForm(new F_PM_2801());
- break;
- #endregion
- #region 生产管理-条码管理
- case "0602":
- //生产管理-条码管理
- break;
- case "060201":
- //生产管理-条码生成
- //this.ShowDialogForm(new F_PM_0103());
- this.ShowDialogForm(new F_PM_0103());
- break;
- case "060202":
- //生产管理-条码维护
- //this.ShowDialogForm(new F_PM_0201());
- this.ShowInDockPanel(F_PM_0203.Instance);
- break;
- case "060203":
- //生产管理-商标设定
- this.ShowDialogForm(new F_PM_2118());
- break;
- case "060204":
- //生产管理-条码打印
- this.ShowDialogForm(new F_MST_012006());
- break;
- case "060205":
- //生产管理-开模报损
- this.ShowDialogForm(new F_PM_2901());
- break;
- case "060207":
- //生产管理-条码预设
- this.ShowInDockPanel(F_PM_0107.Instance);
- break;
- #endregion
- #region 生产管理-生产数据采集
- case "0603":
- //生产管理-生产数据采集
- //F_PM_0301 fpm0301 = F_PM_0301.Instance(13);
- //ShowInDockPanel(fpm0301);
- //break;
- //case "06030101":
- // //生产管理-工序检验
- // break;
- break;
- #endregion
- #region 生产管理-废弃产品管理
- case "060401":
- //生产管理-产品报损
- this.ShowInDockPanel(F_PM_1101.Instance);
- break;
- #endregion
- #region 检验管理
- case "062001":
- //检验管理-半成品检验
- this.ShowInDockPanel(F_PM_2201.Instance);
- break;
- #endregion
- #region 生产订单
- case "0621":
- this.ShowInDockPanel(F_PM_2301.Instance);
- break;
- case "0622"://产成品交接
- this.ShowInDockPanel(F_PM_2401.Instance);
- break;
- #endregion
- #region 报表管理-生产数据
- case "060501":
- //生产数据-在产品明细数据
- this.ShowInDockPanel(F_RPT_010401.Instance);
- break;
- case "060502":
- //生产数据-产成品明细
- this.ShowInDockPanel(F_RPT_010402.Instance);
- break;
- case "060503":
- //生产数据-半检数据一览
- this.ShowInDockPanel(F_PM_1601.Instance);
- break;
- #endregion
- #region 半检数据
- case "0606":
- //生产数据-半检数据一览
- this.ShowInDockPanel(F_PM_1603.Instance);
- break;
- case "0608":
- // 在产盘点
- this.ShowInDockPanel(F_PM_2101.Instance);
- break;
- case "062301":
- // 成型盘点
- this.ShowInDockPanel(F_PM_2601.Instance);
- break;
- case "0609":
- //撤销包装
- F_PM_2104 frm2104 = new F_PM_2104();
- frm2104.ShowDialog();
- break;
- case "0610":
- //损坏撤销
- F_PM_2106 frm2106 = new F_PM_2106();
- frm2106.ShowDialog();
- break;
- case "0611":
- //公坯设定
- F_PM_2107 frm2107 = new F_PM_2107();
- frm2107.ShowDialog();
- break;
- case "0612":
- //清除在产残留数据
- this.ShowInDockPanel(F_PM_2108.Instance);
- break;
- case "0613":
- //清除在产回收站残留数据
- this.ShowInDockPanel(F_PM_2110.Instance);
- break;
- case "0614":
- //清除在产临时数据
- this.ShowInDockPanel(F_PM_2112.Instance);
- break;
- case "0615":
- //计件撤销
- F_PM_2115 frm2115 = new F_PM_2115();
- frm2115.ShowDialog();
- break;
- case "061601":
- //交坯撤销
- F_PM_2116 frm2116 = new F_PM_2116();
- frm2116.ShowDialog();
- break;
- case "0624":
- //产品挂起
- this.ShowInDockPanel(F_PM_3001.Instance);
- break;
- case "0626":
- //品保抽查
- this.ShowInDockPanel(F_PM_3101.Instance);
- break;
- #endregion
- #region SAP
- case "SAP0101":
- this.ShowInDockPanel(F_SAP_HEGII_0101.Instance);
- break;
- case "SAP0102":
- this.ShowInDockPanel(F_SAP_HEGII_0102.Instance);
- break;
- case "SAP0103":
- this.ShowInDockPanel(F_SAP_HEGII_0103.Instance);
- break;
- #endregion
- #region 生产计划 xuwei 20190827 add
- //case "PP0101":
- // //年计划
- // this.ShowInDockPanel(F_PP_0101.Instance);
- // break;
- //case "PP0102":
- // //月计划
- // this.ShowInDockPanel(F_PP_0201.Instance);
- // break;
- //case "PP0103":
- // //日计划
- // this.ShowInDockPanel(F_PP_0301.Instance);
- // break;
- //case "PP0104":
- // //计划分析
- // this.ShowInDockPanel(F_PP_0121.Instance);
- // break;
- #endregion
- #region 其他
- default:
- TreeNode treenodes = ((TreeView)sender).SelectedNode;
- if (treenodes.Name.ToString().StartsWith("0603"))
- {
- string[] sub = treenodes.Tag.ToString().Split(',');
- if (sub[0] != string.Empty)
- {
- if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.DeliverMud))
- {
- //生产管理-交坯
- F_PM_0401 frm0401 = F_PM_0401.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0401);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.LoadCar))
- {
- //生产管理-装窑车
- F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0501);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Normal))
- {
- if (Convert.ToInt32(sub[2]) == 1) // 计件模式
- {
- F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0301);
- }
- else if (Convert.ToInt32(sub[2]) == 2) // 半成品检验(标准检验)
- {
- F_PM_0901 frm0901 = F_PM_0901.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0901);
- }
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKiln))
- {
- //生产管理-入窑
- F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0601);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.OutKiln))
- {
- //生产管理-出窑
- F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0601);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.UnloadCar))
- {
- //生产管理-卸窑车
- F_PM_0601 frm0601 = F_PM_0601.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0601);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.CarAdd))
- {
- //生产管理-窑车补件
- F_PM_0501 frm0501 = F_PM_0501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0501);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.AdobeStock))
- {
- //生产管理-坯库
- F_PM_0301 frm0301 = F_PM_0301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm0301);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.QualityStatistics))
- {
- //生产管理-成检(质量统计)
- F_PM_1201 frm1201 = F_PM_1201.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm1201);
- }
- //xuwei add 2019-12-12
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.SemiQualityStatistics))
- {
- //生产管理-半检(质量统计)
- F_PM_3201 frm3201 = F_PM_3201.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm3201);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.IntoKilnCheck))
- {
- //生产管理-入窑前检验
- F_PM_1301 frm1301 = F_PM_1301.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm1301);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.SpecialRepair))
- {
- //生产管理-干补
- F_PM_2001 frm2001 = F_PM_2001.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm2001);
- }
- else if (Convert.ToInt32(sub[0]) == Convert.ToInt32(Constant.ProcedureModelType.Recovery))
- {
- //生产管理-回收
- F_PM_2501 frm2501 = F_PM_2501.Instance(Convert.ToInt32(sub[1]), treenodes.Text);
- this.ShowInDockPanel(frm2501);
- }
- }
- }
- break;
- #endregion
- }
- }
- }
- }
- }
- catch (Exception ex)
- {
- // 对异常进行共通处理
- ExceptionManager.HandleEventException(this.ToString(),
- MethodBase.GetCurrentMethod().Name, this.Text, ex);
- }
- }
- /// <summary>
- /// 展开全部节点
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnExpand_Click(object sender, EventArgs e)
- {
- TreeNode node = null;
- if (this.trvMenu.SelectedNode != null)
- {
- node = this.trvMenu.SelectedNode;
- this.trvMenu.SelectedNode = null;
- }
- else if (this.trvMenu.Nodes.Count > 0)
- {
- node = this.trvMenu.Nodes[0];
- }
- this.trvMenu.ExpandAll();
- if (node != null)
- {
- this.trvMenu.SelectedNode = node;
- }
- this.trvMenu.Focus();
- }
- /// <summary>
- /// 折叠全部节点
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void btnCollapse_Click(object sender, EventArgs e)
- {
- this.trvMenu.CollapseAll();
- this.trvMenu.Focus();
- }
- /// <summary>
- /// 设置按钮大小
- /// </summary>
- /// <param name="sender"></param>
- /// <param name="e"></param>
- private void trvMenu_SizeChanged(object sender, EventArgs e)
- {
- this.btnExpand.Width = this.trvMenu.Width / 2;
- }
- #endregion
- #region 私有方法
- /// <summary>
- /// 设置窗体按钮的文本信息
- /// </summary>
- private void SetFromTitleInfo()
- {
- this.Text = FormTitles.F_SYS_0202;
- }
- /// <summary>
- /// 获取用户菜单的一级菜单
- /// </summary>
- /// <param name="treeTable">用户菜单数据集</param>
- /// <returns>一级菜单字典</returns>
- private Dictionary<string, string> InitNavigationButtons(DataTable treeTable)
- {
- try
- {
- Dictionary<string, string> dicTemp = new Dictionary<string, string>();
- DataRow[] navigationRows = treeTable.Select("LEN(FunctionCode) = " + Constant.INT_IS_TWO.ToString()); // 编号2为一级菜单
- foreach (DataRow newRow in navigationRows)
- {
- string funcName = newRow["FunctionName"].ToString();
- string funcCode = newRow["FunctionCode"].ToString();
- if (!dicTemp.ContainsKey(funcCode))
- {
- dicTemp.Add(funcCode, funcName);
- }
- }
- return dicTemp;
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 初始化树形控件
- /// </summary>
- /// <param name="treeTable">菜单数据表</param>
- /// <param name="rows">待处理的菜单集合</param>
- /// <param name="node">当前树节点</param>
- private void InitTreeView(DataTable treeTable, DataRow[] rows, TreeNode node)
- {
- foreach (DataRow row in rows)
- {
- TreeNode sNode;
- if (node == null)
- {
- sNode = new TreeNode();
- sNode.Text = row["FunctionName"].ToString();
- sNode.Name = row["FunctionCode"].ToString();
- //xuwei add 2019-11-28
- sNode.Tag = row["Url"].ToString();
- //xuwei end
- if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
- {
- sNode.ImageIndex = Constant.INT_IS_ONE;
- sNode.SelectedImageIndex = Constant.INT_IS_ONE;
- }
- this.trvMenu.Nodes.Add(sNode);
- }
- else
- {
- sNode = node.Nodes.Add(row["FunctionName"].ToString());
- sNode.Name = row["FunctionCode"].ToString();
- #region 陈冰 修改 增加工序类别和工序ID 2014-9-23
- //node.Tag = nodeRoot["FunctionCode"].ToString();
- //xuwei modify 2019-11-28
- //sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString();
- sNode.Tag = row["ProcedureModeltype"].ToString() + "," + row["ProcedureID"].ToString() + "," + row["ProcedureModel"].ToString()+"," + row["Url"].ToString();
- //xuwei end
- #endregion
- if (Constant.FunctionFlag.Form.GetHashCode().ToString().Equals(row["FunctionFlag"].ToString().Trim()))
- {
- sNode.ImageIndex = Constant.INT_IS_ONE;
- sNode.SelectedImageIndex = Constant.INT_IS_ONE;
- }
- }
- string filterExpression = "Functionlevel LIKE '" + row["Functionlevel"].ToString()
- + "%' AND LEN(Functionlevel) = " + (row["Functionlevel"].ToString().Length + Constant.INT_IS_TWO);
- DataRow[] subRows = treeTable.Select(filterExpression);
- // 递归方法
- InitTreeView(treeTable, subRows, sNode);
- }
- }
- /// <summary>
- /// 显示对应的页面中主窗体中
- /// </summary>
- /// <param name="dockPanelBaseForm">需要停靠的DockPanelBase</param>
- private void ShowInDockPanel(DockPanelBase dockPanelBaseForm)
- {
- try
- {
- if (dockPanelBaseForm == null)
- {
- return;
- }
- dockPanelBaseForm.Show(_dockPanel, DockState.Document);
- dockPanelBaseForm.Activate();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- /// <summary>
- /// 模态打开窗体
- /// </summary>
- /// <param name="formBase"></param>
- private void ShowDialogForm(FormBase formBase)
- {
- try
- {
- if (formBase == null)
- {
- return;
- }
- formBase.ShowDialog();
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- private void InitNavigationTreeView(DataTable treeTable)
- {
- try
- {
- TreeNode node = null;
- DataRow[] navigationRows = treeTable.Select
- ("LEN(Functionlevel) = 2");
- // 递归生成功能权限树
- this.InitTreeView(treeTable, navigationRows, node);
- }
- catch (Exception ex)
- {
- throw ex;
- }
- }
- #endregion
- }
- }
|