public void LoadChildren(FileManager fm) { eFileSearchBindingSource.DataSource = ""; myFM = fm; appDB.EFileSearchDataTable dt = myFM.AtMng.FileSearchByParentFileId(myFM.CurrentFileId); eFileSearchBindingSource.DataSource = dt; eFileSearchGridEX.MoveFirst(); }
public byte[] FileSearch(string where, string whereContact, string whereCaseStatus, bool includeXrefs) { DataSet ds = this.ExecuteDataset("FileSearchXref", where, whereContact, whereCaseStatus, includeXrefs); ds.RemotingFormat = SerializationFormat.Binary; ds.Tables[0].RemotingFormat = SerializationFormat.Binary; appDB.EFileSearchDataTable dt = new appDB.EFileSearchDataTable(); dt.Merge(ds.Tables[0]); dt.RemotingFormat = this.RemotingFormat; return(CompressData(dt)); }
public appDB.EFileSearchDataTable SearchByContact(int contactId, string contactType) { this.sqlDa.SelectCommand = sqlSelect; this.sqlSelect.Parameters.Clear(); this.sqlSelect.CommandText = "[FileSearchByContact]"; this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ContactId", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters["@ContactId"].Value = contactId; this.sqlSelect.Parameters.Add(new System.Data.SqlClient.SqlParameter("@contactType", System.Data.SqlDbType.NVarChar, 2, System.Data.ParameterDirection.Input, false, ((System.Byte)(10)), ((System.Byte)(0)), "", System.Data.DataRowVersion.Current, null)); this.sqlSelect.Parameters["@contactType"].Value = contactType; appDB.EFileSearchDataTable dt = new appDB.EFileSearchDataTable(); Fill(dt); return dt; }
public byte[] FileSearch(string userName, DateTime dateStart, DateTime dateEnd) { DataSet ds = this.ExecuteDataset("FileSearchRecentFiles", userName, dateStart, dateEnd); ds.RemotingFormat = SerializationFormat.Binary; ds.Tables[0].RemotingFormat = SerializationFormat.Binary; appDB.EFileSearchDataTable dt = new appDB.EFileSearchDataTable(); dt.Merge(ds.Tables[0]); dt.RemotingFormat = this.RemotingFormat; return(CompressData(dt)); }
public fMassActivity(Form f, Object bs) : base(f) { InitializeComponent(); appDB.EFileSearchDataTable efsdt = (appDB.EFileSearchDataTable)bs; searchResultBindingSource.DataSource = efsdt; foreach (appDB.EFileSearchRow efs in efsdt) { efs.SetMessageNull(); efs.SetResultNull(); } fmCurrent = this.AtMng.GetFile(); DataView dv = new DataView(fmCurrent.Codes("vACMenu"), "Menu='MassActivity'", "StepCode", DataViewRowState.CurrentRows); UIHelper.ComboBoxInit(dv, ucActivity, fmCurrent); UIHelper.ComboBoxInit("vTemplateList1", uiTemplate, fmCurrent); gridFileList.LoadingRow += new Janus.Windows.GridEX.RowLoadEventHandler(gridFileList_LoadingRow); }
public byte[] FileSearch(string search, string keyword, int officeId) { string spName; switch (search) { case "ICASE": spName = "FileSearchByICASENumber"; break; case "ParentFile": spName = "FileSearchFindParentFile"; break; case "FileId": spName = "FileSearchByFileId"; break; case "ParentFileId": spName = "FileSearchByParentFileId"; break; case "SIN": spName = "FileSearchBySIN"; break; case "OfficeFileNum": spName = "FileSearchByOfficeFileNum"; break; case "LastName": spName = "FileSearchByLastName"; break; case "LastNameExact": spName = "FileSearchByLastNameExact"; break; case "FileNumber": spName = "FileSearchByFileNumber"; break; case "FullFileNumber": spName = "FileSearchByFullFileNumber"; break; case "FullFileName": spName = "FileSearchByFullFileName"; break; default: spName = "FileSearchByKeyword"; break; } // DataSet ds=this.ExecuteDataset( spName, new SqlParameter("@keyword", keyword), new SqlParameter("@officeid",officeId)); DataSet ds = this.ExecuteDataset(spName, keyword, officeId); ds.RemotingFormat = SerializationFormat.Binary; ds.Tables[0].RemotingFormat = SerializationFormat.Binary; // if(base.myTrans==null) // ds=SqlHelper.ExecuteDataset(this.SqlCon, CommandType.StoredProcedure, spName, new SqlParameter("@keyword", keyword), new SqlParameter("@officeid",officeId)); // else // ds=SqlHelper.ExecuteDataset(this.myTrans, CommandType.StoredProcedure, spName, new SqlParameter("@keyword", keyword), new SqlParameter("@officeid",officeId)); appDB.EFileSearchDataTable dt = new appDB.EFileSearchDataTable(); dt.Constraints.Clear(); dt.Merge(ds.Tables[0]); dt.RemotingFormat = this.RemotingFormat; return(CompressData(dt)); }
public void SetShortcutsXrefs() { bool hasControls = false; if (Atmng != null && fmCurrent != null) { appDB.EFileSearchDataTable dt = Atmng.FileSearchByParentFileId(fmCurrent.CurrentFileId); docDB.DocXRefDataTable dtDocShortcuts = Atmng.DocShortcuts(fmCurrent.CurrentFileId); int x = 1; string thisParent; if (fmCurrent.CurrentFile.FullFileNumber.LastIndexOf("-") < 0) { thisParent = fmCurrent.CurrentFile.FullFileNumber; } else { thisParent = fmCurrent.CurrentFile.FullFileNumber.Substring(0, fmCurrent.CurrentFile.FullFileNumber.LastIndexOf("-")); }; while (pnlXRefsContainer.Controls.Count > 1) { pnlXRefsContainer.Controls.RemoveAt(0); //pnlXRefsContainer.Controls.Count - 1 } Label lblDocShortcut = CreateXrefGroupLabel(LawMate.Properties.Resources.DocumentShortcuts, x); x++; int count = 0; foreach (docDB.DocXRefRow docxref in dtDocShortcuts) { CreateShortcutXRefButton(docxref, x); x++; count++; } lblDocShortcut.Text += " (" + count + ")"; if (count > 0) { hasControls = true; } Label lblShortcut = CreateXrefGroupLabel(LawMate.Properties.Resources.FileShortcuts, x); x++; count = 0; foreach (appDB.EFileSearchRow efr in dt.Select(" LinkType=2", "XRefName")) { CreateShortcutXRefButton(efr, x); x++; count++; } lblShortcut.Text += " (" + count + ")"; if (count > 0) { hasControls = true; } Label lblContainer = CreateXrefGroupLabel(LawMate.Properties.Resources.ContainerCrossReferences, x); x++; count = 0; foreach (appDB.EFileSearchRow efr in dt.Select("LinkType=1 ", UIHelper.Translate(fmCurrent, "NameE"))) { if (fmCurrent.DB.FileMetaType.FindByMetaTypeCode(efr.MetaType).IsContainer) { CreateShortcutXRefButton(efr, x); x++; count++; } } lblContainer.Text += " (" + count + ")"; if (count > 0) { hasControls = true; } Label lblLeafOther = CreateXrefGroupLabel(LawMate.Properties.Resources.LeafCrossReferencesInOtherContainers, x); x++; count = 0; foreach (appDB.EFileSearchRow efr in dt.Select("LinkType=1 ", UIHelper.Translate(fmCurrent, "NameE"))) { if (!fmCurrent.DB.FileMetaType.FindByMetaTypeCode(efr.MetaType).IsContainer) { string trgParent = efr.FullFileNumber.Substring(0, efr.FullFileNumber.LastIndexOf("-")); if (trgParent != thisParent) { CreateShortcutXRefButton(efr, x); x++; count++; } } } lblLeafOther.Text += " (" + count + ")"; if (count > 0) { hasControls = true; } Label lblLeafSame = CreateXrefGroupLabel(LawMate.Properties.Resources.LeafCrossReferencesInSameContainer, x); x++; count = 0; foreach (appDB.EFileSearchRow efr in dt.Select("LinkType=1 ", UIHelper.Translate(fmCurrent, "NameE"))) { if (!fmCurrent.DB.FileMetaType.FindByMetaTypeCode(efr.MetaType).IsContainer) { string trgParent = efr.FullFileNumber.Substring(0, efr.FullFileNumber.LastIndexOf("-")); if (trgParent == thisParent) { CreateShortcutXRefButton(efr, x); x++; count++; } } } lblLeafSame.Text += " (" + count + ")"; //if (count > 0) // hasControls = true; //pnlXRefs.Enabled = hasControls; } }