//EF框架传值 private void FormL2RC_EF_START_FORM_BY_EF(object sender, EF_Args i_args) { try { String[] names = i_args.callParams; this.Server = names[0]; this.Username = names[1]; this.Password = names[2]; this.serverName = names[3]; Logger.Info("获取需要的参数----" + DateTime.Now.ToString()); } catch (Exception ex) { Logger.Error(ex.Message); } }
private void FormEPESSUBJ_EF_PRE_DO_F5(object sender, EF_Args e) { xtraTabControl1.SelectedTabPage = xtraTabPageDept; fgDevGridDeptInfo.ShowAddRowButton = true; fgDevGridDeptInfo.ShowAddCopyRowButton = true; fgDevGridDeptInfo.ShowDeleteRowButton = true; fgDevGridDeptInfo.SetAllColumnEditable(true); fgDevGridDeptInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = true; fgDevGridDeptInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = true; fgDevGridDeptInfo.ShowContextMenu = true; }
private void FormEPESSUBJ_EF_PRE_DO_F4(object sender, EF_Args e) { xtraTabControl1.SelectedTabPage = xtraTabPageUser; fgDevGridUserInfo.ShowAddRowButton = true; fgDevGridUserInfo.ShowAddCopyRowButton = true; fgDevGridUserInfo.ShowDeleteRowButton = true; fgDevGridUserInfo.SetAllColumnEditable(true); //colDEPT_ENAME.OptionsColumn.AllowEdit = false; colDEPT_CNAME.OptionsColumn.AllowEdit = false; colTIMETIRED.OptionsColumn.AllowEdit = false; fgDevGridUserInfo.ShowContextMenu = true; fgDevGridUserInfo.EmbeddedNavigator.Buttons.CustomButtons[INITPASS].Visible = true; fgDevGridUserInfo.EmbeddedNavigator.Buttons.CustomButtons[USERDISCARD].Visible = true; fgDevGridUserInfo.EmbeddedNavigator.Buttons.CustomButtons[USERSAVE].Visible = true; gridViewUserInfo_FocusedRowChanged(null, null); }
private void FormEPESSUBJ_EF_DO_F4(object sender, EF_Args e) { bool success = true; if (isChange(dataSetEPESSUBJ.TESUSERINFO)) { if (userCheck()) { if (SaveUserInfo()) { QueryUser(); } else { success = false; } } else { success = false; } } if (success) { fgDevGridUserInfo.ShowAddRowButton = false; fgDevGridUserInfo.ShowAddCopyRowButton = false; fgDevGridUserInfo.ShowDeleteRowButton = false; fgDevGridUserInfo.SetAllColumnEditable(false); fgDevGridUserInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridUserInfo.EmbeddedNavigator.Buttons.CustomButtons[INITPASS].Visible = false; fgDevGridUserInfo.EmbeddedNavigator.Buttons.CustomButtons[USERDISCARD].Visible = false; fgDevGridUserInfo.EmbeddedNavigator.Buttons.CustomButtons[USERSAVE].Visible = false; fgDevGridUserInfo.ShowContextMenu = false; } else { //this.//fg_args.buttonStatusHold = true; } }
private void FormESAUTH_EF_DO_F3(object sender, EF_Args e) { Manage_OK_CANCEL(); }
/// <summary> /// 菜单预导出 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormEPESOBJ_EF_PRE_DO_F7(object sender, EF_Args e) { this.treeList.OptionsView.ShowCheckBoxes = true; }
/// <summary> /// 取消菜单导出 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormEPESOBJ_EF_CANCEL_DO_F7(object sender, EF_Args e) { this.treeList.OptionsView.ShowCheckBoxes = false; foreach (TreeListNode node in treeList.Nodes) { node.CheckState = CheckState.Unchecked; CheckSubNodes(node, CheckState.Unchecked); } }
//群组维护 private void FormESSUBJ_EF_PRE_DO_F3(object sender, EF_Args e) { xtraTabControl1.SelectedTabPage = xtraTabPageGroup; fgDevGridGroupInfo.ShowAddRowButton = true; fgDevGridGroupInfo.ShowAddCopyRowButton = true; fgDevGridGroupInfo.ShowDeleteRowButton = true; fgDevGridGroupInfo.SetAllColumnEditable(true); fgDevGridGroupInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = true; fgDevGridGroupInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = true; fgDevGridUserInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridGroupInfo.ShowContextMenu = true; gridViewGroupInfo_FocusedRowChanged(null, null); isManageMode = true; }
private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { Assembly assembForm; Type type; Object obj = null; MethodInfo EFShow; object[] objects = new object[1]; EF_Args fg_args = new EF_Args(); string dllName = ""; string dllPath = ""; string subSystem = ""; string subPath = ""; string CallMode = ""; string fullName = ""; string formENameBase = ""; string startPath = EC.ProjectConfig.Instance.EPDirectory + "\\..\\"; //this.EFMsgInfo = ""; if (this.formName != string.Empty) { subSystem = this.formName.Substring(0, 2); } else { //this.EFMsgInfo = "FormName is empty"; return; } if ((subSystem.Substring(0, 1) == "E") && subSystem != "EM") { subPath = "EP"; } else { subPath = subSystem; } //获取dllname EI.EIInfo inblk = new EI.EIInfo(); EI.EIInfo outblk = new EI.EIInfo(); inblk.SetColName(1, "name"); inblk.SetColName(3, "mode"); inblk.SetColName(4, "appname"); inblk.SetColVal(1, 1, 1, this.formName); inblk.SetColVal(1, 1, 3, 0); inblk.SetColVal(1, 1, "appname", comboApp.EditValue.ToString().Split(':')[0]); outblk = EI.EITuxedo.CallService("epesformactual", inblk); if (outblk.sys_info.flag < 0 /*|| outblk.GetColVal(1, "dllname") == string.Empty*/) { //this.EFMsgInfo = string.Format(EP.EPES.EPESC0000045/*获取画面{0}的dllname失败*/, formName); return; } else { dllName = outblk.GetColVal(1, "dllname"); CallMode = outblk.GetColVal(1, "form_call_mode"); } dllPath = startPath + subPath + "\\" + dllName; if (CallMode == "1" || CallMode == "9") { formENameBase = outblk[1][0, "form_base_name"]; fullName = subSystem + ".Form" + formENameBase; } else { fullName = subSystem + ".Form" + formName; } //生成画面实例 try { assembForm = Assembly.LoadFrom(dllPath); type = assembForm.GetType(fullName); obj = Activator.CreateInstance(type); } catch { //this.EFMsgInfo = string.Format(EP.EPES.EPESC0000046/*{0}载入失败*/, dllPath); if (obj != null) ((DevExpress.XtraEditors.XtraForm)obj).Close(); return; } //为授权按钮加标签 this.SetControls(obj); ((System.Windows.Forms.Form)obj).Text = EP.EPES.EPESC0000123/*按钮展示*/; EFShow = type.GetMethod("EFShow"); fg_args.formEName = "BUTTONTIPS"; fg_args.eventId = "START_FORM_BY_EF"; fg_args.formDllName = dllName; fg_args.formDllPath = dllPath; fg_args.formCName = EP.EPES.EPESC0000124/*按钮提示*/; objects[0] = fg_args; EFShow.Invoke(obj, objects); }
private void FormEPESOBJ_EF_CANCEL_DO_F4(object sender, EF_Args e) { if (MessageBox.Show(EP.EPES.EPESC0000160/*是否退出维护模式?*/, EP.EPES.EPESC0000024/*提示*/, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { //fg_args.buttonStatusHold = true; } }
private void FormESOBJ_EF_PRE_DO_F3(object sender, EF_Args e) { fgDevGridFormInfo.ShowAddRowButton = true; fgDevGridFormInfo.ShowAddCopyRowButton = true; fgDevGridFormInfo.ShowDeleteRowButton = true; fgDevGridFormInfo.SetAllColumnEditable(true); fgDevGridButtInfo.ShowAddRowButton = true; fgDevGridButtInfo.ShowAddCopyRowButton = true; fgDevGridButtInfo.ShowDeleteRowButton = true; fgDevGridButtInfo.SetAllColumnEditable(true); colFNAME.OptionsColumn.AllowEdit = false; colAPPNAME1.OptionsColumn.AllowEdit = false; fgDevGridOth.ShowAddRowButton = true; fgDevGridOth.ShowAddCopyRowButton = true; fgDevGridOth.ShowDeleteRowButton = true; fgDevGridOth.SetAllColumnEditable(true); fgDevGridOth.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = true; fgDevGridOth.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = true; fgDevGridFormInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = true; fgDevGridFormInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = true; fgDevGridButtInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = true; fgDevGridButtInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = true; fgDevGridFormInfo.ShowContextMenu = true; fgDevGridButtInfo.ShowContextMenu = true; fgDevGridOth.ShowContextMenu = true; gridViewFormInfo_FocusedRowChanged_1(null, null); gridViewOthInfo_FocusedRowChanged(null, null); }
private void FormESOBJ_EF_DO_F3(object sender, EF_Args e) { bool succsee = true; if (isChange(dataSetESOBJ.TESFORMRESINFO)) { if (formCheck()) { if (SaveFormInfo()) { QueryForm(); } else { succsee = false; } } else { succsee = false; } } if (isChange(dataSetESOBJ.TESBUTTONRESINFO)) { if (btnCheck()) { if (SaveButtInfo()) { QueryButton(); } else { succsee = false; } } else { succsee = false; } } if (isChange(dataSetESOBJ.TESOTHERRESINFO)) { if (othCheck()) { if (SaveOth()) { queryOth(); } else { succsee = false; } } else { succsee = false; } } if (succsee) { fgDevGridFormInfo.ShowAddRowButton = false; fgDevGridFormInfo.ShowAddCopyRowButton = false; fgDevGridFormInfo.ShowDeleteRowButton = false; fgDevGridFormInfo.SetAllColumnEditAble(false); fgDevGridButtInfo.ShowAddRowButton = false; fgDevGridButtInfo.ShowAddCopyRowButton = false; fgDevGridButtInfo.ShowDeleteRowButton = false; fgDevGridButtInfo.SetAllColumnEditAble(false); fgDevGridOth.ShowAddRowButton = false; fgDevGridOth.ShowAddCopyRowButton = false; fgDevGridOth.ShowDeleteRowButton = false; fgDevGridOth.SetAllColumnEditAble(false); fgDevGridOth.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridOth.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridFormInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridFormInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridButtInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridButtInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridFormInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridButtInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridOth.SelectionColumn.OptionsColumn.AllowEdit = true; //colselected.OptionsColumn.AllowEdit = true; //colselected1.OptionsColumn.AllowEdit = true; //gridColumn1.OptionsColumn.AllowEdit = true; fgDevGridFormInfo.ShowContextMenu = false; fgDevGridButtInfo.ShowContextMenu = false; fgDevGridOth.ShowContextMenu = false; } else { //this.//fg_args.buttonStatusHold = true; } }
private void FormESOBJ_EF_CANCEL_DO_F3(object sender, EF_Args e) { if (MessageBox.Show(EP.EPES.EPESC0000160/*是否退出维护模式?*/, EP.EPES.EPESC0000024/*提示*/, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { fgDevGridFormInfo.ShowAddRowButton = false; fgDevGridFormInfo.ShowAddCopyRowButton = false; fgDevGridFormInfo.ShowDeleteRowButton = false; fgDevGridFormInfo.SetAllColumnEditable(false); fgDevGridButtInfo.ShowAddRowButton = false; fgDevGridButtInfo.ShowAddCopyRowButton = false; fgDevGridButtInfo.ShowDeleteRowButton = false; fgDevGridButtInfo.SetAllColumnEditable(false); fgDevGridOth.ShowAddRowButton = false; fgDevGridOth.ShowAddCopyRowButton = false; fgDevGridOth.ShowDeleteRowButton = false; fgDevGridOth.SetAllColumnEditable(false); fgDevGridOth.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridOth.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridFormInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridFormInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridButtInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridButtInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; //colselected.OptionsColumn.AllowEdit = true; fgDevGridFormInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridButtInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridOth.SelectionColumn.OptionsColumn.AllowEdit = true; //colselected1.OptionsColumn.AllowEdit = true; //gridColumn1.OptionsColumn.AllowEdit = true; fgDevGridFormInfo.ShowContextMenu = false; fgDevGridButtInfo.ShowContextMenu = false; fgDevGridOth.ShowContextMenu = false; if (isChange(dataSetESOBJ.TESFORMRESINFO)) { QueryForm(); } if (isChange(dataSetESOBJ.TESBUTTONRESINFO)) { QueryButton(); } if (isChange(dataSetESOBJ.TESOTHERRESINFO)) { queryOth(); } } else { //this.//fg_args.buttonStatusHold = true; } }
private void FormESSUBJ_EF_CANCEL_DO_F3(object sender, EF_Args e) { if (MessageBox.Show(EP.EPES.EPESC0000160/*是否退出维护模式?*/, EP.EPES.EPESC0000024/*提示*/, MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { fgDevGridGroupInfo.ShowAddRowButton = false; fgDevGridGroupInfo.ShowAddCopyRowButton = false; fgDevGridGroupInfo.ShowDeleteRowButton = false; fgDevGridGroupInfo.SetAllColumnEditable(false); fgDevGridGroupInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridGroupInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridGroupInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridGroupInfo.ShowContextMenu = false; isManageMode = false; if (isChange(dataSetEPESSUBJ.TESGROUPINFO)) { queryGroup(); } } else { //this.//fg_args.buttonStatusHold = true; } }
private void FormEPESOBJ_EF_DO_F4(object sender, EF_Args e) { }
private void FormESSUBJ_EF_DO_F3(object sender, EF_Args e) { bool success = true; if (isChange(dataSetEPESSUBJ.TESGROUPINFO)) { if (groupCheck()) { if (SaveGroupInfo()) { queryGroup(); } else { success = false; } } else { success = false; } } if (success) { fgDevGridGroupInfo.ShowAddRowButton = false; fgDevGridGroupInfo.ShowAddCopyRowButton = false; fgDevGridGroupInfo.ShowDeleteRowButton = false; fgDevGridGroupInfo.SetAllColumnEditable(false); fgDevGridGroupInfo.SelectionColumn.OptionsColumn.AllowEdit = true; fgDevGridGroupInfo.EmbeddedNavigator.Buttons.CustomButtons[DISCARD].Visible = false; fgDevGridGroupInfo.EmbeddedNavigator.Buttons.CustomButtons[SAVE].Visible = false; fgDevGridGroupInfo.ShowContextMenu = false; isManageMode = false; } else { //this.//fg_args.buttonStatusHold = true; } }
/// <summary> /// 菜单导出 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormEPESOBJ_EF_DO_F7(object sender, EF_Args e) { DataSet ds = new DataSet(); ds.Clear(); ds.Tables.Add(dataSetESOBJ.TESTREEINFO.Clone()); ds.Tables.Add(dataSetESOBJ.TESTREEINFO_RES.Clone()); DataRelation dr = new DataRelation( "TESTREEINFO_TESTREEINFO_RES", new DataColumn[] { ds.Tables[0].Columns["ACLID"], ds.Tables[0].Columns["NAME"] }, new DataColumn[] { ds.Tables[1].Columns["ACLID"], ds.Tables[1].Columns["NAME"] }); ds.Relations.Add(dr); EI.EIInfo inBlk = new EI.EIInfo(); inBlk.Tables.Clear(); DataTable dtCheckedNodes = new DataTable(); dtCheckedNodes.Columns.Add("NAME"); GetCheckedNode(treeList.Nodes, dtCheckedNodes); inBlk.Tables.Add(dtCheckedNodes); Utility.ExportData(inBlk, "epestree_exp", ds); foreach (TreeListNode node in treeList.Nodes) { node.CheckState = CheckState.Unchecked; CheckSubNodes(node, CheckState.Unchecked); } this.treeList.OptionsView.ShowCheckBoxes = false; }
private void FormEPESAUTH_EF_START_FORM_BY_EF(object sender, EF_Args i_args) { para_groupname = i_args.callParams[0]; para_appname = i_args.callParams[1]; }
/// <summary> /// 菜单导入 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormEPESOBJ_EF_DO_F8(object sender, EF_Args e) { ImportData(); }
private void FormESAUTH_EF_PRE_DO_F3(object sender, EF_Args e) { isManageMode = true; }
/// <summary> /// 细部资源导出 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void FormEPESOBJ_EF_DO_FB(object sender, EF_Args e) { DataSet ds = new DataSet(); ds.Tables.Clear(); ds.Tables.Add(dataSetESOBJ.TESOTHERRESINFO.Clone()); ds.Tables.Add(dataSetESOBJ.TESOTHERRESINFO_RES.Clone()); DataRelation dr = new DataRelation("TESOTHERRESINFO_TESOTHERRESINFO_RES", new DataColumn[] { ds.Tables[0].Columns["ACLID"] }, new DataColumn[] { ds.Tables[1].Columns["ACLID"] }); ds.Relations.Add(dr); EI.EIInfo inBlk = new EI.EIInfo(); inBlk.AddColName("NAME"); int j = 1; for (int i = 0; i < this.gridViewOthInfo.RowCount; i++) { if (this.fgDevGridOth.GetSelectedColumnChecked(i)) { string name = gridViewOthInfo.GetRowCellValue(i, "NAME").ToString(); if (name != null) { inBlk.SetColVal(1, j++, "NAME", name); } } } Utility.ExportData(inBlk, "epesother_exp", ds); }