public override Abletech.Arxivar.Entities.Arx_KeyValue[] Execute(Abletech.Arxivar.Entities.Arx_KeyValue[] keys) { Dm_Fascicoli fascicolo = WcfConnectorManager.ARX_DATI.Dm_Fascicoli_GetData_ById(Ids[0]); Dm_FileInFolder[] collezione = WcfConnectorManager.ARX_DATI.Dm_FileInFolder_GetData_ByFolder(Ids[0]); if (collezione == null || !collezione.Any()) { MessageBox.Show("Il fascicolo è vuoto"); return(null); } var select = new Dm_Profile_Select(); select.DOCNUMBER.Selected = true; select.DOCNAME.Selected = true; select.ORIGINALE.Selected = true; select.DATADOC.Selected = true; select.CREATION_DATE.Selected = true; var search = new Dm_Profile_Search(); var docnumberList = string.Join(";", collezione.Select(x => x.DOCNUMBER.ToString()).ToArray()); search.DocNumber.SetFilterMultiple(Dm_Base_Search_Operatore_Numerico.Uguale, docnumberList); Arx_DataSource searchResult = WcfConnectorManager.ARX_SEARCH.Dm_Profile_GetData(search, select, 0); FormDocumentiFascicolo formDocumentiFascicolo = new FormDocumentiFascicolo(fascicolo, searchResult, WcfConnectorManager); var dialogResult = formDocumentiFascicolo.ShowDialog(); return(null); }
private void buttonSearchProfile2_Click(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; try { using (var profileSelect = new Dm_Profile_Select()) using (var profileSearch = new Dm_Profile_Search()) { //Prendiamo 30 righe al massimo profileSelect.MaxRowCount = 30; //Prendiamo il campo DOCNUMBER e diciamo: //1) Mostriamolo in output //2) Nella lista sarà l'elemento di posizione "0" //3) Inidichiamo che l'elemento è il primo da ordinare //4) Indichiamo che l'elemento sia ordinato in modo ascendente profileSelect.DOCNUMBER.... = true; profileSelect.DOCNUMBER.... = 0; profileSelect.DOCNUMBER........ = 0; profileSelect.DOCNUMBER........ = EOrderByDirection.Ascending; //Prendiamo il campo DOCNAME e diciamo: //1) Mostriamolo in output //2) Nella lista sarà l'elemento di posizione "1" //3) Inidichiamo che l'elemento è il secondo da ordinare //4) Indichiamo che l'elemento sia ordinato in modo ascendente profileSelect.DOCNAME.... = true; profileSelect.DOCNAME.... = 1; profileSelect.DOCNAME........ = 1; profileSelect.DOCNAME........ = EOrderByDirection.Descending; //Prendiamo il campo ORIGINALE e diciamo: //1) Mostriamolo in output //2) Nella lista sarà l'elemento di posizione "2" profileSelect.ORIGINALE.... = true; profileSelect.ORIGINALE.... = 2; //Chiediamo all'utente quale parola deve ricercare int docNumberScelto = (Int32.Parse(Interaction.InputBox("Quale DOCNUMBER cerchi?", "Ricerche con WCF", "Immetti un valore"))); profileSearch........(......., docNumberScelto); //Esecuzione della ricerca, mostrando il risultato nella DataGridLayout using (var ds = _manager........(profileSearch, profileSelect, 0)) { dgSearch.DataSource = ds.GetDataTable(0); } } } catch (Exception exception) { MessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { Cursor = Cursors.Default; } }
private void buttonSearchProfile_Click(object sender, EventArgs e) { Cursor = Cursors.WaitCursor; try { using (var profileSelect = new Dm_Profile_Select()) using (var profileSearch = new Dm_Profile_Search()) { profileSelect.MaxRowCount = 30; profileSelect.DOCNUMBER.Selected = true; profileSelect.DOCNUMBER.Index = 0; profileSelect.DOCNUMBER.OrderBy.Index = 0; profileSelect.DOCNUMBER.OrderBy.Direction = EOrderByDirection.Ascending; profileSelect.DOCNAME.Selected = true; profileSelect.DOCNAME.Index = 1; profileSelect.DOCNAME.OrderBy.Index = 1; profileSelect.DOCNAME.OrderBy.Direction = EOrderByDirection.Descending; profileSelect.ORIGINALE.Selected = true; profileSelect.ORIGINALE.Index = 2; profileSelect.CREATION_DATE.Selected = true; profileSelect.CREATION_DATE.Index = 3; profileSearch.DocName.SetFilter(Dm_Base_Search_Operatore_String.Contiene, "C#"); using (var ds = _manager.ARX_SEARCH.Dm_Profile_GetData(profileSearch, profileSelect, 0)) { dgSearch.DataSource = ds.GetDataTable(0); } } } catch (Exception exception) { MessageBox.Show(exception.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { Cursor = Cursors.Default; } }