public void bindOpinionData(lmDatasets.Advisory.OpinionDataTable a) { ucMultiDropDown1.SetDataBinding(FM.Codes("LawyerList"), ""); UIHelper.ComboBoxInit("OpinionType", mccOpinionType, FM); ucContactSelectBox1.FM = FM; ucOfficeSelectBox1.AtMng = FM.AtMng; this.opinionBindingSource.DataSource = a.DataSet; this.opinionBindingSource.DataMember = a.TableName; atriumBE.DocManager dm = FM.GetDocMng(); OpenDocDialog = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog; //ucDoc1.OpenDocDialog = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog; //ucDoc1.Init(dm); ucDocView1.OpenDocDialog = ((fMain)Application.OpenForms["fMain"]).OpenDocDialog; ucDocView1.Init(dm); Advisory.OpinionRow or = CurrentRow(); LoadDocs(or); a.ColumnChanged += new DataColumnChangeEventHandler(a_ColumnChanged); FM.GetAdvisoryMng().GetOpinion().OnUpdate += new atLogic.UpdateEventHandler(ucOpinion_OnUpdate); ApplySecurity(CurrentRow()); }
private void Init(fAdvancedSearch referrer, string fullText) { LoadLabels(); dm = this.AtMng.GetFile().GetDocMng(); //ucDoc1.Init(dm); //ucDoc1.ReturnFocusTo = ucRecordList1; ucDocView1.Init(dm); ucDocView1.ReturnFocusTo = ucRecordList1; fProgress = MainForm.FProgress; if (referrer != null) { myfAS = referrer; } else { tsReviseSearchCriteria.Visible = Janus.Windows.UI.InheritableBoolean.False; } //ucDoc1.Clear(); ucDocView1.Clear(); if (fullText != "") { FullText = fullText; tbFullTextCriteriaRO.Text = fullText; this.Text += " [" + fullText + "]"; //pnlLeft.Closed = false; pnlLeft.Closed = true; tsHitHilite.Visible = Janus.Windows.UI.InheritableBoolean.False; tsPreview1.Visible = Janus.Windows.UI.InheritableBoolean.False; IsFullTextSearch = true; tsHitHilite.Checked = Janus.Windows.UI.InheritableBoolean.True; cmdPrevHit.Visible = Janus.Windows.UI.InheritableBoolean.True; cmdNextHit.Visible = Janus.Windows.UI.InheritableBoolean.True; cmdFirstHit.Visible = Janus.Windows.UI.InheritableBoolean.True; cmdLastHit.Visible = Janus.Windows.UI.InheritableBoolean.True; cmdToggleHighlight.Visible = Janus.Windows.UI.InheritableBoolean.True; SetPreview(true); } else { tsHitHilite.Visible = Janus.Windows.UI.InheritableBoolean.False; pnlLeft.Closed = true; cmdPrevHit.Visible = Janus.Windows.UI.InheritableBoolean.False; cmdNextHit.Visible = Janus.Windows.UI.InheritableBoolean.False; cmdFirstHit.Visible = Janus.Windows.UI.InheritableBoolean.False; cmdLastHit.Visible = Janus.Windows.UI.InheritableBoolean.False; cmdToggleHighlight.Visible = Janus.Windows.UI.InheritableBoolean.False; } }
private void fTemplates_Load(object sender, EventArgs e) { myFM = AtMng.GetTemplate().FM; myDM = myFM.GetDocMng(); ucDoc1.Init(myDM); UIHelper.ComboBoxInit(myFM.Codes("vDocType"), mccCommType, myFM); UIHelper.ComboBoxInit(myFM.Codes("TemplateLayoutStyle"), mccLayoutStyle, myFM); templateBindingSource.DataSource = AtMng.DB; templateBindingSource.CurrentChanged += new EventHandler(templateBindingSource_CurrentChanged); templateBindingSource.ResetBindings(false); templateGridEX.MoveFirst(); cmdInsertTag.Enabled = Janus.Windows.UI.InheritableBoolean.False; }
public void Init(atriumBE.DocManager _dm, docDB.DocumentRow doc) { dm = _dm; currentMsg = doc; //get autocomplete list for addresses AutoCompleteStringCollection aSend = new AutoCompleteStringCollection(); DataTable dt = dm.AtMng.RecipientGetRecentSent(); foreach (DataRow dr in dt.Rows) { aSend.Add(dr["Address"].ToString()); } tbNewRecipient.AutoCompleteCustomSource = aSend; dvRecip = new DataView(doc.Table.DataSet.Tables["Recipient"], "docid=" + currentMsg.DocId.ToString() + " and Type='" + myRecipType + "'", "", DataViewRowState.CurrentRows); Reload(); //if (myReadOnly) // flowLayoutPanelRecipient.Controls.Remove(tbNewRecipient); }
private void uiCommandManager1_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e) { try { switch (e.Command.Key) { case "cmdSave": if (this.folderBrowserDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string path = this.folderBrowserDialog1.SelectedPath; DataSet ds = (DataSet)bindingSource1.DataSource; atriumBE.DocManager dm = this.AtMng.GetFile().GetDocMng(); foreach (DataRow dr in ds.Tables[0].Rows) { int docrefid = (int)dr["DocRefId"]; int docid = (int)dr["DocId"]; string version = (string)dr["CurrentVersion"]; lmDatasets.docDB.DocumentRow docr = dm.GetDocument().Load(docid); docr.efSubject = dr["FullFileNumber"].ToString() + " " + docr.efSubject; dm.GetDocContent().Load(docrefid, version); dm.GetDocument().Export(docr, false, path); dm.DB.DocContent.Clear(); dm.DB.DocContent.AcceptChanges(); } } break; case "cmdExecute": try { ebMessage.Text = "Executing...Please Wait"; ebCount.Text = ""; string sSQL = ebSQL.Text; if (ebSQL.SelectedText.Length > 0) { sSQL = ebSQL.SelectedText; } if (sSQL == "") { ebMessage.Text = "No query to execute"; ebCount.Text = ""; return; } DataSet ds = AtMng.AppMan.ExecuteDatasetSQL(sSQL); bindingSource1.DataSource = ds; gridEX1.DataSource = ds; gridEX1.RetrieveStructure(true); foreach (Janus.Windows.GridEX.GridEXColumn gc in gridEX1.Tables[1].Columns) { gc.EditType = Janus.Windows.GridEX.EditType.NoEdit; if (gc.DataTypeCode == TypeCode.DateTime) { gc.FormatString = "g"; } } ebMessage.Text = "Done"; if (ds.Tables.Count > 0) { ebCount.Text = ds.Tables[0].Rows.Count.ToString(); gridEX1.ExpandRecords(); } } catch (Exception x) { ebMessage.Text = "Error: " + x.Message; ebCount.Text = ""; UIHelper.HandleUIException(x); } break; case "cmdSaveExcel": this.saveFileDialog1.ShowDialog(); string file3 = this.saveFileDialog1.FileName; if (file3 == "") { return; } Janus.Windows.GridEX.Export.GridEXExporter oExport = new Janus.Windows.GridEX.Export.GridEXExporter(); oExport.GridEX = gridEX1; oExport.ExportMode = Janus.Windows.GridEX.ExportMode.AllRows; oExport.IncludeChildTables = true; oExport.IncludeCollapsedRows = true; oExport.IncludeExcelProcessingInstruction = true; oExport.IncludeFormatStyle = true; oExport.IncludeHeaders = true; System.IO.FileStream LayoutStream = new System.IO.FileStream(file3, System.IO.FileMode.Create, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite); oExport.Export(LayoutStream); LayoutStream.Close(); break; } } catch (Exception x) { UIHelper.HandleUIException(x); } }