private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            dgv_Common.Tag = "Sys_RoleGridViewSet";

            LoadData();
        }
        /// <summary>
        /// 根据菜单添加结构到功能普通树
        /// </summary>
        private void AddFunctionTreeViewNodes()
        {
            //string strSql = "SELECT FBH,GNBH,replace(GNMC,'&','') as GNMC FROM SYS_FUNCTION where GNMC<>'-' order by GNBH";

            //string strSql = "SELECT sParentFunctionID,sFunctionID,replace(sFunctionName,'&','') as sFunctionName FROM SYS_MainFunctions where sFunctionName<>'-' order by sFunctionID";
            string strSql = "SELECT sMenuGroupID,sFunctionID,sFunctionName FROM SYS_Menu  order by sSortBy";
            DataTable DT = ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSql).Tables[0];
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            TV.ReadNodesFromDataTable(this.treeViewFunction, DT, false, 0, 1, 2);
            DT.Clear();
            GC.Collect();
        }
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            gc_UpLoad.Tag = "SYS_DOC";

            LoadData();
            this.gv_UpLoad.OptionsView.ColumnAutoWidth = false;
            ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gc_UpLoad);
        }
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            dgv_Common.Tag = "Bas_BoardQualityPrice";
            dgv_Common.AllowUserToAddRows = false;

            dgv_Customer.Tag = "Bas_Customer";
            string CuststrSql = "select '通用' sCustID,'针对所有客户通用' sCustName Union All select sCustID,sCustName from Bas_Customer";
            DT_cust = ZX.ZXSystem.DBUtility.DbHelperSQL.Query(CuststrSql).Tables[0];
            dgv_Customer.AllowUserToAddRows = false;
            dgv_Customer.DataSource = DT_cust;
            ZX.Controls.DataGridViewC.GetDatagridviewFromDB(this.Text + '-' + dgv_Customer.Name, "通用", this.dgv_Customer);
            LoadData();
        }
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            gc_Authority.Tag = "SYS_User_Authority";

            gc_Role.Tag = "SYS_User_Info";
            string strSqlRole = "select distinct(sRole) from SYS_User_Info";
            DataTable DTRole = ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSqlRole).Tables[0];

            this.gc_Role.DataSource = DTRole;
            ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gc_Role);

            this.gv_Authority.OptionsView.ColumnAutoWidth = false;
            ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gc_Authority);
        }
Пример #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            TV.SetTreeViewTag(this.treeView1);

            DataTable DT = TV.SaveToDataTable(this.treeView1, "FBH", "GNBH", "GNMC");
            DT.TableName = "SYS_FUNCTION";
            if (DT.Rows.Count > 0)
            {
                DataColumn DC1 = new DataColumn("WJMC");
                DC1.MaxLength = 100;
                DataColumn DC2 = new DataColumn("MMKJ");
                DC1.MaxLength = 200;
                DataColumn DC3 = new DataColumn("WJICO");
                DC1.MaxLength = 500;
                DataColumn DC4 = new DataColumn("HELPPATH");
                DC1.MaxLength = 200;
                DT.Columns.AddRange(new DataColumn[] { DC1, DC2, DC3, DC4 });
                for (int i = 0; i < DT.Rows.Count; i++)
                {
                    //文本字串格式
                    //功能菜单名称$功能程序集文件名$功能命名空间加类名$功能图标$功能帮助
                    string[] SplitStr = DT.Rows[i]["GNMC"].ToString().Split('$');
                    DT.Rows[i]["GNMC"] = SplitStr[0];
                    DT.Rows[i]["WJMC"] = SplitStr[1];
                    DT.Rows[i]["MMKJ"] = SplitStr[2];
                    DT.Rows[i]["WJICO"] = SplitStr[3];
                    DT.Rows[i]["HELPPATH"] = SplitStr[4];
                }
                DT.AcceptChanges();

                if (SystemClass.AdoNetOperation.DataTableInputDataBase(SystemClass.ConnectString.GetConnectionString(), DT, "SYS_FUNCTION", false) == true)
                {
                    ZX.Class.Log.WriteLog.Write("ZXSystem.Function.FunManage", "SaveFunctionNode", "保存功能列表到数据库成功", ZX.Class.Log.NormalLogType.InfoLog);
                }
                else
                {
                    SystemClass.MessageBoxShow.ShowMessage("保存功能列表到数据库失败!");
                    ZX.Class.Log.WriteLog.Write("ZXSystem.Function.FunManage", "SaveFunctionNode", "保存功能列表到数据库失败", ZX.Class.Log.NormalLogType.WarnLog);
                }
            }
        }
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            //gc_Client.Tag = "Bas_Client";
            gc_CustomerMaster.Tag = "Bas_Customer";
            gc_CustomerAddress.Tag = "Bas_CustomerAddress";
            gc_CustomerContact.Tag = "Bas_CustomerContact";

            LoadData();
            //this.gv_Client.OptionsView.ColumnAutoWidth = false;
            //ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gc_Client);
            this.gv_CustomerMaster.OptionsView.ColumnAutoWidth = false;
            ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gc_CustomerMaster);
            gv_CustomerMaster.OptionsView.ShowAutoFilterRow = true;
            tabPage1.Selected = true;
        }
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
              // dgv_Customer.AllowUserToAddRows = false;
            gridControlEx1.Tag = "Bas_Customer";
            gridView1.OptionsView.ColumnAutoWidth = false;

            LoadData();
            ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gridControlEx1);

               // this. gridView1.Columns[n].BestFit();
        }
        private void LoadData()
        {
            string strSql = "select * from Bas_Area";
            //DT = ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSql).Tables[0];

            //this.gc_Customer.DataSource = DT;

               DT= ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSql).Tables[0];

            //BindRoot();

            //treeList1.DataSource = DT;
            //treeList1.KeyFieldName = "sAreaID";//设置主键
            //treeList1.ParentFieldName = "sParentAreaID";//设置父级主键
            //treeList1.RootValue = "";//顶级树结点的值

               //TreeListFillInfo();

            ZX.Controls.TreeViewC tv = new ZX.Controls.TreeViewC();
            tv.ReadNodesFromDataTable(this.treeView1, DT, false, 1, 0, 2);
        }
Пример #10
0
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            //gc_Customer.Tag = "Bas_Customer";

            LoadData();
            //this.gv_Customer.OptionsView.ColumnAutoWidth = false;
            //ZX.Controls.GridControlEx.GetDatagridviewFromDB("通用", gc_Customer);
            //treeList1.OptionsView.ShowCheckBoxes = true;
        }
Пример #11
0
        private void FindNodeByTag(string sNodeTag)
        {
            treeView1.Focus();
            ZX.Controls.TreeViewC tv = new ZX.Controls.TreeViewC();
            TreeNode[] TempTreeNode = tv.FindTreeNodeFromTag(this.treeView1, sNodeTag);
            //iTreeNodeIndex = TempTreeNode.Length;
            if (iTreeNodeIndex < TempTreeNode.Length)
            {

                this.treeView1.SelectedNode = TempTreeNode[iTreeNodeIndex];
                iTreeNodeIndex += 1;
            }
            else
            {
                iTreeNodeIndex = 0;
            }
        }
        private void Form_Main_Load(object sender, EventArgs e)
        {
            ZX.Win.FunctionParameter FP = (ZX.Win.FunctionParameter)this.Tag; ;
            DataGridView HRDG = FP.MyGridView;
            ZX.Win.SetToolBarIcon SBI = new ZX.Win.SetToolBarIcon();
            SBI.SetImage(Application.StartupPath + @"\Images\TooBarIco", this.ToolStrip1, FP.ToolStripitemDisplayStyle);
            ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
            dgv_Common.Tag = "Bas_PartType";
            dgv_Common.AllowUserToAddRows = false;
            gc_Common.Tag = "Bas_PartType";

            LoadData();
            ZX.Controls.DataGridViewEx.GridControlEx.GetDatagridviewFromDB("通用", gc_Common);
        }
Пример #13
0
 /// <summary>
 /// 根据菜单添加结构到功能普通树
 /// </summary>
 private void AddTreeViewHelpNodes()
 {
     string strSql = "SELECT sMenugroupID,sFunctionID,replace(sFunctionName,'&','') as sFunctionName FROM SYS_Menu where sFunctionName<>'-' order by smenugroupid,ssortby";
     DataTable DT = ZX.ZXSystem.DBUtility.DbHelperSQL.Query(strSql).Tables[0];
     #region"用普通的树TreeView控件"
     ZX.Controls.TreeViewC TV = new ZX.Controls.TreeViewC();
     TV.ReadNodesFromDataTable(this.treeViewHelp, DT, false, 0, 1, 2);
     #endregion
     #region"用HR的树控件"
     //FromMenuAddNodeToTreeView();
     #endregion
     DT.Clear();
     GC.Collect();
 }