Ejemplo n.º 1
0
        private EI.EIInfo QryFormButt(string formName)
        {
            EI.EIInfo inblk = new EI.EIInfo();
            EI.EIInfo outblk;

            int col;
            col = 1;
            inblk.SetColName(col++, "bname");  //按钮名
            inblk.SetColName(col++, "aclid"); //fgLabelText2.EFEname.ToLower()
            inblk.SetColName(col++, "mode");
            inblk.SetColName(col++, "fname");
            inblk.SetColName(col++, "appname");

            inblk.SetColVal(1, 1, "fname", formName);
            inblk.SetColVal(1, 1, "mode", 0);
            inblk.SetColVal(1, 1, "appname", this.selectedAppname);
            inblk.AddNewBlock();
            inblk.SetColName(2, 1, "userid");
            inblk.SetColName(2, 2, "appname");
            inblk.SetColVal(2, 1, "userid", "XXLoginUserIDXX");
            inblk.SetColVal(2, 1, "appname",  "EventArgs.epEname");

            outblk = EI.EITuxedo.CallService("epesbutt_inq2", inblk);
            return outblk;
        }
Ejemplo n.º 2
0
        private void SaveAuth()
        {
            //this.//EFMsgInfo = "";

            if (listFormGrant.Count > 0)
            {
                EI.EIInfo inblk = new EI.EIInfo();
                EI.EIInfo outblk;

                string code = subjEname;
                int mode = 2;

                inblk.SetColName(1, "ei_row_num");
                inblk.SetColName(2, "name");
                inblk.SetColName(3, "cname");
                inblk.SetColName(5, "mode");
                inblk.SetColName(6, "code");
                inblk.SetColName(7, "username");
                inblk.SetColName(8, "appname");
                inblk.AddNewBlock();
                inblk.SetColName(2, 1, "userid");
                inblk.SetColName(2, 2, "appname");

                for (int i = 0; i < listFormGrant.Count; i++ )
                {
                    inblk.SetColVal(1, i+1, "name", listFormGrant[i]);
                }

                inblk.SetColVal(1, 5, mode);
                inblk.SetColVal(1, 6, code);
                inblk.SetColVal(1, 7, "XXLoginUserIDXX".Trim());
                inblk.SetColVal(1, "appname", this.selectedAppname);
                inblk.SetColVal(2, 1, "userid", "XXLoginUserIDXX");
                inblk.SetColVal(2, 1, "appname", this.selectedAppname);

                outblk = EI.EITuxedo.CallService("epesform_grant", inblk);

                if (outblk.sys_info.flag == 0)
                {
                    //this.//EFMsgInfo = string.Format(EP.EPES.EPESC0000118/*成功执行 sqlcode is {0}*/, outblk.sys_info.sqlcode.ToString());
                }
                else
                {
                    MessageBox.Show(outblk.sys_info.msg, EP.EPES.EPESC0000024, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            if (listFormRevok.Count > 0)
            {
                EI.EIInfo inblk2 = new EI.EIInfo();
                EI.EIInfo outblk2;

                string code = subjEname;
                int mode = 2;

                inblk2.SetColName(2, "name");
                inblk2.SetColName(3, "cname");
                inblk2.SetColName(5, "mode");
                inblk2.SetColName(6, "code");
                inblk2.SetColName(7, "username");
                inblk2.SetColName(8, "appname");
                inblk2.AddNewBlock();
                inblk2.SetColName(2, 1, "userid");
                inblk2.SetColName(2, 2, "appname");

                for (int j = 0; j < listFormRevok.Count; j++ )
                {
                    inblk2.SetColVal(1, j+1, "name", listFormRevok[j]);
                }
                inblk2.SetColVal(1, 5, mode);
                inblk2.SetColVal(1, 6, code);
                inblk2.SetColVal(1, 7, "XXLoginUserIDXX".Trim());
                inblk2.SetColVal(1, "appname", this.selectedAppname);
                inblk2.SetColVal(2, 1, "userid", "XXLoginUserIDXX");
                inblk2.SetColVal(2, 1, "appname", this.selectedAppname);

                outblk2 = EI.EITuxedo.CallService("epesform_revoke", inblk2);

                if (outblk2.sys_info.flag == 0)
                {
                    //this.//EFMsgInfo = string.Format(EP.EPES.EPESC0000118/*成功执行 sqlcode is {0}*/, outblk2.sys_info.sqlcode.ToString());
                }
                else
                {
                    MessageBox.Show(outblk2.sys_info.msg, EP.EPES.EPESC0000024, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            if (listButtGrant.Count > 0 || listButtRevok.Count > 0)
            {
                EI.EIInfo inblk = new EI.EIInfo();
                EI.EIInfo outblk;

                inblk.SetColName(1, "buttname");
                inblk.SetColName(2, "formname");
                inblk.SetColName(3, "groupname");
                inblk.SetColName(4, "mode");
                inblk.SetColName(5, "appname");
                inblk.SetColName(10, "username");

                string buttname = "", formname = "";
                int i = 0;
                for ( i = 0; i < listButtGrant.Count; i++)
                {
                    int len = listButtGrant[i].Length;
                    buttname = listButtGrant[i].Substring(listButtGrant[i].IndexOf(',')+1, len - listButtGrant[i].IndexOf(',')-1);
                    formname = listButtGrant[i].Substring(0,listButtGrant[i].IndexOf(','));
                    inblk.SetColVal(1, i + 1, 1, buttname);
                    inblk.SetColVal(1, i + 1, 2, formname);
                    inblk.SetColVal(1, i + 1, 4, 1);
                }

                for (int j = i ; j < i + listButtRevok.Count; j++)
                {
                    int len = listButtRevok[j-i].Length;
                    buttname = listButtRevok[j - i].Substring(listButtRevok[j - i].IndexOf(',') + 1, len - listButtRevok[j - i].IndexOf(',') - 1);
                    formname = listButtRevok[j - i].Substring(0, listButtRevok[j - i].IndexOf(','));
                    inblk.SetColVal(1, j + 1, 1, buttname);
                    inblk.SetColVal(1, j + 1, 2, formname);
                    inblk.SetColVal(1, j + 1, 4, 0);
                }

                inblk.SetColVal(1, 3, subjEname);
                inblk.SetColVal(1, "appname", this.selectedAppname);
                inblk.SetColVal(1, "username", "XXLoginUserIDXX");

                outblk = EI.EITuxedo.CallService("epesbuttauthupd", inblk);

                if (outblk.sys_info.flag == 0)
                {
                    //this.//EFMsgInfo = string.Format(EP.EPES.EPESC0000118/*成功执行 sqlcode is {0}*/, outblk.sys_info.sqlcode.ToString());
                }

                else
                {
                    MessageBox.Show(outblk.sys_info.msg, EP.EPES.EPESC0000024, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            //刷新结果
            if (xtraTabControlObj.SelectedTabPage == xtraTabPageList)
            {
                RfgreshFormList();
            }
            else if(xtraTabControlObj.SelectedTabPage == xtraTabPageTree)
            {
                RfgreshTree();
            }

            listFormGrant.Clear();
            listFormRevok.Clear();
            listButtGrant.Clear();
            listButtRevok.Clear();

            SaveOthResAuth();
        }
Ejemplo n.º 3
0
        private void InitUserPassword()
        {
            //this.//EFMsgInfo = "";

            if (fgDevGridUserInfo.EFChoiceCount < 1)
            {
                //this.//EFMsgInfo = EP.EPES.EPESC0000114/* "未选中行!*/;
                return;
            }

            EI.EIInfo inblku = new EI.EIInfo();
            EI.EIInfo outblku = new EI.EIInfo();

            inblku.AddColName(1, "ename");
            inblku.AddNewBlock();
            inblku.AddColName(2, "loginname");
            inblku.AddColName(2, "appname");

            inblku.SetColVal(2, 1, "loginname",  "EventArgs.formUserId");
            inblku.SetColVal(2, 1, "appname",  "EventArgs.epEname");

            for (int i = 0, j = 1; i < this.gridViewUserInfo.RowCount; i++)
            {
                //取出选中行
                if (fgDevGridUserInfo.GetSelectedColumnChecked(i))
                {
                    inblku.SetColVal(1, j, "ename", this.gridViewUserInfo.GetRowCellValue(i, "ENAME").ToString());
                    j++;
                }
            }

            outblku = EI.EITuxedo.CallService("epesuserpw_ini", inblku);

            ShowReturnMsg(outblku);

            if (outblku.sys_info.flag == 0)
            {
                MessageBox.Show(EP.EPES.EPESC0000115/*初始化密码成功*/, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //UnCheckAll(gridViewUserInfo, colselected1);
                QueryUser();
            }

            //else if (outblku.sys_info.flag < 0)
            //{
            //    MessageBox.Show(outblku.sys_info.msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            //}
        }
Ejemplo n.º 4
0
        private void treeListMain_DragDrop(object sender, DragEventArgs e)
        {
            //this.//EFMsgInfo = "";

            DevExpress.XtraTreeList.TreeListHitInfo hi = treeListMain.CalcHitInfo(treeListMain.PointToClient(new Point(e.X, e.Y)));

            TreeListNode parentNode = null;

            //拖拽至用户节点
            if (hi.Node.ImageIndex == USERICON)
            {
                parentNode = hi.Node.ParentNode;
            }
            //拖拽至群组节点
            else if (hi.Node.ImageIndex == GROUPICON || hi.Node.ImageIndex == GROUPICON_GRAY)
            {
                parentNode = hi.Node;
            }

            EI.EIInfo inBlock = new EI.EIInfo();
            EI.EIInfo outBlock = new EI.EIInfo();

            //为群组新增子组
            if (xtraTabControl1.SelectedTabPage == xtraTabPageGroup)
            {
                string parentGroup = ((List<string>)parentNode.Tag)[0];

                if (parentGroup == "admingroup"
                    || parentGroup == "formgroup"
                    || parentGroup == "usermanager"
                    || parentGroup == "groupmanager"
                    || parentGroup == "resourcemanager")
                {
                    MessageBox.Show(EP.EPES.EPESC0000193/*系统群组下不可挂子组,请将角色用户直接添加到该组下!*/, "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                inBlock.SetColName(1, 1, "ID");
                inBlock.SetColName(1, 2, "userid");

                inBlock.SetColVal(1, 1, "ID", ((List<string>)parentNode.Tag)[1]);
                inBlock.SetColVal(1, 1, "userid", "XXLoginUserIDXX");

                inBlock.AddNewBlock();
                inBlock.SetColName(1, "ID");

                for (int i = 0, j = 1; i < this.gridViewGroupInfo.RowCount; i++)
                {
                    if (fgDevGridGroupInfo.GetSelectedColumnChecked(i))
                    {
                        inBlock.SetColVal(2, j, "ID", this.gridViewGroupInfo.GetRowCellValue(i, "ID").ToString());
                        j++;
                    }
                }

                outBlock = EI.EITuxedo.CallService("epesgrgr_ins", inBlock);

                if (outBlock.sys_info.flag == 0)
                {
                    queryMember(parentNode);

                    //取消列表框中所有checkbox选中状态
                    UnCheckAll(fgDevGridGroupInfo, gridViewGroupInfo);
                }
            }
            //为群组新增子用户
            else if (xtraTabControl1.SelectedTabPage == xtraTabPageUser)
            {
                inBlock.SetColName(1, 1, "groupid");
                inBlock.SetColName(1, 2, "groupname");
                inBlock.SetColName(1, 3, "user");
                inBlock.SetColName(1, 4, "authmode");

                inBlock.SetColVal(1, 1, "groupid", ((List<string>)parentNode.Tag)[1]);
                inBlock.SetColVal(1, 1, "groupname", ((List<string>)parentNode.Tag)[0]);
                inBlock.SetColVal(1, 1, "user", "XXLoginUserIDXX");
                inBlock.SetColVal(1, 1, "authmode", (EPESCommon.AuthMode == AUTHMODE.MODE_9672) ? 1 : 0);

                inBlock.AddNewBlock();
                inBlock.SetColName(1, "userid");
                inBlock.SetColName(2, "username");

                for (int i = 0, j = 1; i < this.gridViewUserInfo.RowCount; i++)
                {
                    if (fgDevGridUserInfo.GetSelectedColumnChecked(i))
                    {
                        inBlock.SetColVal(2, j, "userid", this.gridViewUserInfo.GetRowCellValue(i, "ID").ToString());
                        inBlock.SetColVal(2, j, "username", this.gridViewUserInfo.GetRowCellValue(i, "ENAME").ToString());
                        j++;
                    }
                }

                outBlock = EI.EITuxedo.CallService("epesgrus_ins", inBlock);

                if (outBlock.sys_info.flag == 0)
                {
                    queryMember(parentNode);

                   // 取消列表框中所有checkbox选中状态
                    UnCheckAll(fgDevGridUserInfo, gridViewUserInfo);
                }
            }

            ShowReturnMsg(outBlock);

            treeListMain.OptionsBehavior.DragNodes = false;
        }
Ejemplo n.º 5
0
        private void fgDevGridOth_MouseMove(object sender, MouseEventArgs e)
        {
            if (dataSetESOBJ.TESOTHERRESINFO.Rows.Count == 0)
            {
                return;
            }
            if (e.Button != MouseButtons.Lfgt) return;

            if (fgDevGridOth.EFChoiceCount == 0 /*getChoiceCount(gridViewOthInfo) == 0*/)
            {
                return;
            }

            EI.EIInfo inBlock = new EI.EIInfo();
            inBlock.SetColName(1, 1, "groupid");
            inBlock.SetColName(1, 2, "appname");
            inBlock.SetColName(1, 3, "restype");
            inBlock.SetColName(1, 4, "groupname");
            inBlock.AddNewBlock();
            inBlock.SetColName(2, 1, "resid");
            inBlock.SetColName(2, 2, "resname");
            inBlock.SetColName(2, 3, "fname");
            inBlock.SetColName(2, 4, "desc");

            inBlock.SetColVal(1, 1, "appname", comboApp.EditValue.ToString().Split(':')[0]);
            inBlock.SetColVal(1, 1, "restype", "other");

            for (int i = 0, j = 1; i < this.gridViewOthInfo.RowCount; i++)
            {
                //取出选中行
                if (fgDevGridOth.GetSelectedColumnChecked(i))
                {
                    inBlock.SetColVal(2, j, "resid", dataSetESOBJ.TESOTHERRESINFO.Rows[i]["ACLID"].ToString());
                    inBlock.SetColVal(2, j, "resname", dataSetESOBJ.TESOTHERRESINFO.Rows[i]["NAME"].ToString());
                    inBlock.SetColVal(2, j, "fname", " ");
                    inBlock.SetColVal(2, j, "desc", dataSetESOBJ.TESOTHERRESINFO.Rows[i]["DESCRIPTION"].ToString());
                    j++;
                }
            }

            dragFromGrid = true;

            fgDevGridOth.DoDragDrop(inBlock, DragDropEffects.Copy);
        }
Ejemplo n.º 6
0
        //删除群组成员
        private void barButtonItemDeleteUser_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            //if (this.treeListMain.FocusedNode == null || this.treeListMain.FocusedNode.ParentNode == null)
            //{
            //    return;
            //}

            if (treeListMain.Selection.Count == 0)
            {
                return;
            }

            EI.EIInfo inBlock = new EI.EIInfo();
            EI.EIInfo outBlock = new EI.EIInfo();

            inBlock.SetColName(1, 1, "groupid");
            inBlock.SetColName(1, 2, "user");

            inBlock.SetColVal(1, 1, "groupid", ((List<string>)parent.Tag)[1]);
            inBlock.SetColVal(1, 1, "user", "XXLoginUserIDXX");

            //子组
            inBlock.AddNewBlock();
            inBlock.SetColName(1, "id");

            for (int i = 0, j = 1; i < this.treeListMain.Selection.Count; i++)
            {
                //子组节点
                if (this.treeListMain.Selection[i].ImageIndex == GROUPICON || this.treeListMain.Selection[i].ImageIndex == GROUPICON_GRAY)
                {
                    inBlock.SetColVal(2, j, "id", ((List<string>)this.treeListMain.Selection[i].Tag)[1]);
                    j++;
                }
            }

            //子用户
            inBlock.AddNewBlock();
            inBlock.SetColName(1, "id");

            for (int i = 0, j = 1; i < this.treeListMain.Selection.Count; i++)
            {
                //子用户节点
                if (this.treeListMain.Selection[i].ImageIndex == USERICON)
                {
                    inBlock.SetColVal(3, j, "id", ((List<string>)this.treeListMain.Selection[i].Tag)[1]);
                    j++;
                }
            }

            outBlock = EI.EITuxedo.CallService("epessubmem_del", inBlock);

            ShowReturnMsg(outBlock);

            if (outBlock.sys_info.flag == 0)
            {
                queryMember(parent);
                parent = null;
            }
        }
Ejemplo n.º 7
0
        private void treeList_DragDrop(object sender, DragEventArgs e)
        {
            if (fg_args.b_info[2].Status != EFButtonKeysStatus.PRE_ACTIVE)
            {
                e.Effect = DragDropEffects.None;

                 MessageBox.Show(EP.EPES.EPESC0000071/*操作失败!请进入维护模式进行排序操作!*/, EP.EPES.EPESC0000024/*提示*/, MessageBoxButtons.OK, MessageBoxIcon.Error);

                TreeListNode parent = treeList.FocusedNode.ParentNode;

                queryChildNodes(parent);
                return;
            }

            //this.EFMsgInfo = "";

            DevExpress.XtraTreeList.TreeListHitInfo hi = treeList.CalcHitInfo(treeList.PointToClient(new Point(e.X, e.Y)));

            string[] format = e.Data.GetFormats();

            //拖拽的是菜单树中的节点——节点排序
            if (format[0] == "DevExpress.XtraTreeList.Nodes.TreeListNode")
            {
                if(hi!=null)
                {
                    if (hi.Node != null)
                    {
                        TreeListNode dragnode = e.Data.GetData(typeof(TreeListNode)) as TreeListNode;
                        TreeListNode targetnode = hi.Node;

                        if (//dragnode.ImageIndex == FORMICON &&
                            targetnode.ParentNode != null
                            && dragnode.ParentNode == targetnode.ParentNode) //同级目录拖曳
                        {
                            treeList.SetNodeIndex(dragnode, treeList.GetNodeIndex(targetnode));
                            OrderNodes(hi.Node.ParentNode);
                        }
                        else if (dragnode.ImageIndex == FORMICON && targetnode.ParentNode != null
                            && dragnode.ParentNode != targetnode.ParentNode) //非同级目录拖曳
                        {
                            if (InsertNodeToTree(dragnode, targetnode))
                            {
                                if (targetnode.ImageIndex == FORMICON)
                                {
                                    queryChildNodes(targetnode.ParentNode);
                                }
                                else
                                {
                                    queryChildNodes(targetnode);
                                }

                                RemoveNodeFromTree(dragnode);
                            }
                        }
                    }
                }
                e.Effect = DragDropEffects.None;
            }

            //拖拽的是画面信息列表框中的行——新增画面
            else
            {
                TreeListNode parentNode = null;
                int treeseq = 0;

                //拖拽至画面节点
                if (hi.Node.ImageIndex == FORMICON)
                {
                    parentNode = hi.Node.ParentNode;
                }
                //拖拽至目录节点
                else if (hi.Node.Level == 0)
                {
                    MessageBox.Show(EP.EPES.EPESC0000178/*不能将画面挂于根目录下,请先建立子目录*/, EP.EPES.EPESC0000024/*提示*/, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    parentNode = hi.Node;
                }
                treeseq = parentNode.Nodes.Count;

                //新增画面
                EI.EIInfo inBlock = new EI.EIInfo();
                EI.EIInfo outBlock;

                inBlock.SetColName(1, 1, "fname");
                inBlock.SetColName(1, 2, "name");
                inBlock.SetColName(1, 3, "resname");
                inBlock.SetColName(1, 4, "description");
                inBlock.SetColName(1, 5, "shortcut");
                inBlock.SetColName(1, 6, "treeno");
                inBlock.SetColName(1, 7, "treeseq");
                inBlock.SetColName(1, 8, "userid");

                for (int i = 0, j = 1; i < this.gridViewFormInfo.RowCount; i++)
                {
                    //取出选中行
                    if (/*gridViewFormInfo.GetRowCellValue(i, fgDevGridFormInfo.SelectionColumn).ToString() == "True"*/fgDevGridFormInfo.GetSelectedColumnChecked(i))
                    {
                        if (treeseq > 999)
                        {
                            MessageBox.Show(EP.EPES.EPESC0000072/*新增失败*/, EP.EPES.EPESC0000024/*提示*/, MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }

                        inBlock.SetColVal(1, j, "name", parentNode.Tag + dataSetESOBJ.TESFORMRESINFO.Rows[i]["NAME"].ToString());
                        inBlock.SetColVal(1, j, "fname", parentNode.Tag);
                        inBlock.SetColVal(1, j, "description", dataSetESOBJ.TESFORMRESINFO.Rows[i]["DESCRIPTION"].ToString());
                        inBlock.SetColVal(1, j, "shortcut", " ");
                        inBlock.SetColVal(1, j, "resname", dataSetESOBJ.TESFORMRESINFO.Rows[i]["NAME"].ToString());
                        inBlock.SetColVal(1, j, "treeno", "0");
                        inBlock.SetColVal(1, j, "treeseq", treeseq.ToString("d3"));

                        treeseq++;
                        j++;
                    }
                }

                inBlock.AddNewBlock();
                inBlock.SetColName(1, "NAME");
                inBlock.SetColVal(2, 1, 1, parentNode.Tag);
                inBlock.SetColName(2, "cursystem");
                inBlock.SetColVal(2, 1, 2, comboApp.EditValue.ToString().Split(':')[0]);

                outBlock = EI.EITuxedo.CallService("epestree_insb", inBlock);

                if (outBlock.sys_info.flag == 0)
                {
                    queryChildNodes(parentNode);

                    //取消列表框中所有checkbox选中状态
                    for (int k = 0; k < dataSetESOBJ.TESFORMRESINFO.Rows.Count; k++)
                    {
                        fgDevGridFormInfo.SetSelectedColumnChecked(k, false);
                        //gridViewFormInfo.SetRowCellValue(k, "selected", false);
                    }
                    this.gridViewFormInfo.Invalidate();
                }

                ShowReturnMsg(outBlock);
            }
        }
Ejemplo n.º 8
0
        private void RemoveNodeFromTree(TreeListNode node)
        {
            EI.EIInfo inblkd = new EI.EIInfo();
            EI.EIInfo outblkd = new EI.EIInfo();

            TreeListNode parent = node.ParentNode;

            //权限检验
            inblkd.SetColName(1, 1, "name");
            inblkd.SetColVal(1, 1, node.Tag.ToString());

            inblkd.AddNewBlock();
            inblkd.SetColName(2, 1, "userid");
            inblkd.SetColName(2, 2, "appname");
            inblkd.SetColVal(2, 1, "userid",  EF_Args.formUserId);
            inblkd.SetColVal(2, 1, "appname", comboApp.EditValue.ToString().Split(':')[0]);

            outblkd = EI.EITuxedo.CallService("epestree_delb", inblkd);
            if (outblkd.sys_info.flag == 0)
            {
                //this.EFMsgInfo = EP.EPES.EPESC0000074/*删除成功*/;

                //OrderNodes(parent); //重新排序
                if (node.Level == 0)
                {
                    treeList.Nodes.Remove(node);
                }
                else
                {
                    queryChildNodes(parent);
                }
            }
            else
            {
                //this.EFMsgInfo = string.Format(EP.EPES.EPESC0000055/*删除失败:{0}*/, outblkd.sys_info.msg);
                //MessageBox.Show(//this.EFMsgInfo, EP.EPES.EPESC0000024/*提示*/ , MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 9
0
        //节点排序
        private void OrderNodes(TreeListNode parent)
        {
            EI.EIInfo inBlock = new EI.EIInfo();
            EI.EIInfo outBlock;

            inBlock.SetColName(1, 1, "name");
            inBlock.SetColName(1, 2, "treeseq");

            for (int i = 0; i < parent.Nodes.Count; i++)
            {
                inBlock.SetColVal(1, i + 1, "name", parent.Nodes[i].Tag);
                inBlock.SetColVal(1, i + 1, "treeseq", i.ToString("d3"));
            }

            inBlock.AddNewBlock();

            inBlock.SetColName(1, "cursystem");

            inBlock.SetColVal(2, 1, 1, comboApp.EditValue.ToString().Split(':')[0]);

            outBlock = EI.EITuxedo.CallService("epestree_upds", inBlock);

            if (outBlock.sys_info.flag == 0)
            {
                queryChildNodes(parent);
            }

            ShowReturnMsg(outBlock);
        }
Ejemplo n.º 10
0
        private bool InsertNodeToTree(TreeListNode node, TreeListNode targetNode)
        {
            TreeListNode parentNode = (targetNode.ImageIndex == FORMICON) ? targetNode.ParentNode : targetNode;

            int treeseq = parentNode.Nodes.Count;
            if (treeseq == 999)
            {
                MessageBox.Show("节点数量超过系统上限!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }

            EI.EIInfo inBlock = new EI.EIInfo();
            EI.EIInfo outBlock;

            inBlock.SetColName(1, 1, "fname");
            inBlock.SetColName(1, 2, "name");
            inBlock.SetColName(1, 3, "resname");
            inBlock.SetColName(1, 4, "description");
            inBlock.SetColName(1, 5, "shortcut");
            inBlock.SetColName(1, 6, "treeno");
            inBlock.SetColName(1, 7, "treeseq");
            inBlock.SetColName(1, 8, "userid");

            //string nodeName = node.Tag.ToString();
            string nodeText = node.GetDisplayText(treeListColumn1);
            string nodeResName = nodeText.Substring(nodeText.IndexOf('(') + 1, nodeText.Length - 1 - nodeText.IndexOf('(') -1);
            string nodeDesc = nodeText.Substring(0, nodeText.IndexOf('('));
            int nodeSeq = parentNode.Nodes.Count ;

            string parentNodeName = "";
            parentNodeName = (parentNode.ImageIndex == FORMICON) ? parentNode.ParentNode.Tag.ToString() : parentNode.Tag.ToString();

            inBlock.SetColVal(1, 1, "name", parentNodeName + nodeResName);
            inBlock.SetColVal(1, 1, "fname", parentNodeName);
            inBlock.SetColVal(1, 1, "description", nodeDesc);
            inBlock.SetColVal(1, 1, "shortcut", " ");
            inBlock.SetColVal(1, 1, "resname", nodeResName);
            inBlock.SetColVal(1, 1, "treeno", "0");
            inBlock.SetColVal(1, 1, "treeseq", nodeSeq.ToString("d3"));

            inBlock.AddNewBlock();
            inBlock.SetColName(1, "NAME");
            inBlock.SetColVal(2, 1, 1, parentNodeName);
            inBlock.SetColName(2, "cursystem");
            inBlock.SetColVal(2, 1, 2, comboApp.EditValue.ToString().Split(':')[0]);

            outBlock = EI.EITuxedo.CallService("epestree_insb", inBlock);

            if (outBlock.sys_info.flag != 0)
            {
                ShowReturnMsg(outBlock);
                return false;
            }

            return true;
        }
Ejemplo n.º 11
0
        private void fgDevGridButtInfo_MouseMove(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left) return;

            if (dataSetESOBJ.TESBUTTONRESINFO.Rows.Count == 0 || fgDevGridButtInfo.EFChoiceCount == 0 /*getChoiceCount(gridViewButtInfo) == 0*/)
            {
                return;
            }

            EI.EIInfo inBlock = new EI.EIInfo();
            inBlock.SetColName(1, 1, "groupid");
            inBlock.SetColName(1, 2, "appname");
            inBlock.SetColName(1, 3, "restype");
            inBlock.SetColName(1, 4, "groupname");
            inBlock.AddNewBlock();
            inBlock.SetColName(2, 1, "resid");
            inBlock.SetColName(2, 2, "resname");
            inBlock.SetColName(2, 3, "fname");
            inBlock.SetColName(2, 4, "desc");

            inBlock.SetColVal(1, 1, "appname", comboApp.EditValue.ToString().Split(':')[0]);
            inBlock.SetColVal(1, 1, "restype", "button");

            for (int i = 0, j = 1; i < this.gridViewButtInfo.RowCount; i++)
            {
                //取出选中行
                if (//gridViewButtInfo.GetRowCellValue(i, "selected") != null
                    //&& gridViewButtInfo.GetRowCellValue(i, "selected").ToString() == "True"
                    fgDevGridButtInfo.GetSelectedColumnChecked(i)
                    )
                {
                    inBlock.SetColVal(2, j, "resid", dataSetESOBJ.TESBUTTONRESINFO.Rows[i]["ACLID"].ToString());
                    inBlock.SetColVal(2, j, "resname", dataSetESOBJ.TESBUTTONRESINFO.Rows[i]["NAME"].ToString());
                    inBlock.SetColVal(2, j, "fname", dataSetESOBJ.TESBUTTONRESINFO.Rows[i]["FNAME"].ToString());
                    inBlock.SetColVal(2, j, "desc", dataSetESOBJ.TESBUTTONRESINFO.Rows[i]["DESCRIPTION"].ToString());
                    j++;
                }
            }

            dragFromGrid = true;

            fgDevGridFormInfo.DoDragDrop(inBlock, DragDropEffects.Copy);
        }