private void FieldBindDialogLoad(object sender, EventArgs e) { FieldTreeViewData fvd = CurrentPrjInfo.GetCurrentReportDataDefine() as FieldTreeViewData; if (null == fvd) { return; } if (null != SourceField) { FieldTreeNodeData currentNode = fvd.FindNodeBySource(SourceField); if (null != currentNode) { fvd.PopulateTree(this.DataSourceTreeView, currentNode, true); } } else { fvd.PopulateTree(this.DataSourceTreeView, true, BindingSourceField); } AddParamVar(); //LoadSysParams(); SelectNode(); //this.DataSourceTreeView.ExpandAll(); if (!string.IsNullOrEmpty(this.FieldTextTb.Text)) { this.FieldTextTb.Focus(); this.FieldTextTb.Select(0, this.FieldTextTb.Text.Length); } }
private void SelectedForm_Load(object sender, EventArgs e) { switch (_doctype) { case byte.MaxValue: this.Text = GetStringFromPublicResourceClass.GetStringFromPublicResource("MESPleaseSelectView"); break; case 1: this.Text = GetStringFromPublicResourceClass.GetStringFromPublicResource("MESPleaseSelectReport"); break; case 2: this.Text = GetStringFromPublicResourceClass.GetStringFromPublicResource("MESPleaseSelectForm"); break; } CurrentPrjInfo.GetFormTreeView(_doctype, ref this.treeView1); if (null != Identity) { TreeNode node = FindNodeOnPath(this.treeView1.Nodes, Identity.FullPath); if (null != node) { this.treeView1.SelectedNode = node; node.EnsureVisible(); } } }
public static bool ExportReport(MESCustomViewIdentity identity, Dictionary <string, object> vars, string fileFullPath) { if (identity.IsSpecifiedVersion) { return(ExportReport(identity.ViewID, vars, fileFullPath)); } else { string strfilepath = CurrentPrjInfo.GetViewFile(identity.ParentID, identity.ViewName); return(ExportReport(strfilepath, vars, fileFullPath)); } }
private void RefreshTree() { FieldTreeViewData fvd = CurrentPrjInfo.GetCurrentReportDataDefine() as FieldTreeViewData; if (null == fvd) { return; } if (cb_CustomMode.Checked) { this.tb_TablePath.Enabled = true; fvd.PopulateTree(this.DataSourceTreeView); } else { this.tb_TablePath.Enabled = false; if (null != _allField) { FieldTreeNodeData currentNode = fvd.FindNodeBySource(_allField); if (null != currentNode) { fvd.PopulateTreeAddRoot(this.DataSourceTreeView, currentNode); } } else { fvd.PopulateTree(this.DataSourceTreeView); } } FilterTreeView(); bool isSelect = false; foreach (TreeNode node in this.DataSourceTreeView.Nodes) { isSelect |= SelectNode(SourceField, node); } if (!isSelect) { if (this.DataSourceTreeView.Nodes.Count > 0) { this.DataSourceTreeView.ExpandAll(); } } if (null != this.DataSourceTreeView.SelectedNode) { this.DataSourceTreeView.SelectedNode.EnsureVisible(); } }
private void EditTextBindiDialogLoad(object sender, EventArgs e) { FieldTreeViewData fvd = CurrentPrjInfo.GetCurrentReportDataDefine() as FieldTreeViewData; if (null != fvd && fvd.Nodes.Length > 0) { ReportVar rv = fvd.Nodes[0].Tag as ReportVar; if (null != rv) { foreach (PMSVar pmsVar in rv.PMSVarList) { this.VarTreeView.Nodes.Add(new TreeNode(pmsVar.VarName, 0, 0)); } } } }
public static void Error(string msg, string ctrlName) { LogMsgObj lmo = new LogMsgObj(); lmo.LogType = LogMsgObj.LogMsgType.Error; lmo.User = CurrentPrjInfo.CurrentLoginUserID; lmo.Msg = msg; lmo.Dt = DateTime.Now; object identity = CurrentPrjInfo.GetCurrentDocumentIdentity(); if (null != identity) { lmo.CurrentDocIdentity = identity; } lmo.CtrlName = ctrlName; LogMsg(lmo); }
private void buttonEdit_Click(object sender, EventArgs e) { MESCustomViewIdentity id = GetSelectedIdentity(); if (null != id) { s_CfgFileInfo info = CurrentPrjInfo.GetCfgFileInfo(id); if (null != info) { int msgID = PMS.Libraries.ToolControls.PMSPublicInfo.Message.USER_OPENDOC; byte[] theBytes = PMS.Libraries.ToolControls.PMSPublicInfo.PMSFileClass.ObjToByte(info); if (PMS.Libraries.ToolControls.PMSPublicInfo.Message.PMSDeveloperControlHandle != IntPtr.Zero) { PMS.Libraries.ToolControls.PMSPublicInfo.Message.SendCopyData(PMS.Libraries.ToolControls.PMSPublicInfo.Message.PMSDeveloperControlHandle, msgID, theBytes); } } } }