public ControloAutDragDrop(ListView ListView, TipoNoticiaAut[] TipoNoticiaAutAllowed, GISADataset.ControloAutRow ControloAutRow, Control parent) : base(ListView, typeof(GISADataset.ControloAutRow), typeof(GISADataset.ControloAutRow[])) { this.TipoNoticiaAutAllowed = TipoNoticiaAutAllowed; this.FRDBaseRow = null; this.ControloAutRow = ControloAutRow; this.parent = parent; }
public ControloAutAutorDragDrop(ListView ListView, TipoNoticiaAut[] TipoNoticiaAutAllowed, GISADataset.FRDBaseRow FRDBaseRow) : base(ListView, TipoNoticiaAutAllowed, FRDBaseRow) { }
/* * Usar caso se pretenda usar o PesquisaUFList (ver MenuItemPrint_Click()): * * private ArrayList GetLastSearchResults() * { * ArrayList IDsNiveis = new ArrayList(); * foreach (ListViewItem item in PesquisaUFList1.Items) * IDsNiveis.Add(((GISADataset.NivelRow)item.Tag).ID); * * return IDsNiveis; * } */ private string GetTermosIndexados(GISADataset.FRDBaseRow FRDBaseRow, params TipoNoticiaAut[] TipoNoticiaAut) { string Result = ""; ArrayList ResultArray = new ArrayList(); foreach (GISADataset.IndexFRDCARow index in FRDBaseRow.GetIndexFRDCARows()) { if (Array.IndexOf(TipoNoticiaAut, System.Enum.ToObject(typeof(Model.TipoNoticiaAut), index.ControloAutRow.IDTipoNoticiaAut)) >= TipoNoticiaAut.GetLowerBound(0)) { foreach (GISADataset.ControloAutDicionarioRow cadr in index.ControloAutRow.GetControloAutDicionarioRows()) { if (cadr.IDTipoControloAutForma == Convert.ToInt64(TipoControloAutForma.FormaAutorizada)) { ResultArray.Add(cadr.DicionarioRow.Termo); } } } } ResultArray.Sort(); foreach (string s in ResultArray) { if (Result.Length > 0) { Result = Result + "\\li128\\par\\li0{}"; } Result += s; } if (Result.Length > 0) { Result = Result + "\\li128\\par\\li0{}"; } return(Result); }
private string GetControloAutFormaAut(GISADataset.FRDBaseRow frd, TipoNoticiaAut[] noticiaAut){ ArrayList Results = new ArrayList(); foreach (GISADataset.IndexFRDCARow idx in frd.GetIndexFRDCARows()) { if (Array.IndexOf(noticiaAut, System.Enum.ToObject(typeof(TipoNoticiaAut), idx.ControloAutRow.IDTipoNoticiaAut)) >= 0) { foreach (GISADataset.ControloAutDicionarioRow cad in idx.ControloAutRow.GetControloAutDicionarioRows()) { if (cad.IDTipoControloAutForma == (long)TipoControloAutForma.FormaAutorizada) { Results.Add(cad.DicionarioRow.Termo); } } } } Results.Sort(); string Result = ""; foreach (string s in Results) { if (Result.Length > 0) Result += " / "; Result += s; } return Result; }
private static void MapControloAuts(GISADataset.FRDBaseRow frdRow, List<string> cas, Int32? selector, string messageTag, TipoNoticiaAut tna, UnidadeInformacional ui) { if (cas != null && cas.Count > 0) { cas.ForEach(termo => { var d = GisaDataSetHelper.GetInstance().Dicionario.Cast<GISADataset.DicionarioRow>().SingleOrDefault(r => r.Termo.Equals(termo)); if (d == null) ExceptionHelper.ThrowException(ExceptionHelper.TAB_DOCUMENTOS, ui.identificador, messageTag, termo, ExceptionHelper.ERR_VALOR_INVALIDO); var caRow = d.GetControloAutDicionarioRows() .Where(cad => cad.IDTipoControloAutForma == (long)TipoControloAutForma.FormaAutorizada) .Select(cad => cad.ControloAutRow) .SingleOrDefault(ca => ca.IDTipoNoticiaAut == (int)tna); if (caRow == null) ExceptionHelper.ThrowException(ExceptionHelper.TAB_DOCUMENTOS, ui.identificador, messageTag, termo, ExceptionHelper.ERR_VALOR_INVALIDO); if (caRow.IDTipoNoticiaAut == (int)TipoNoticiaAut.EntidadeProdutora) createSFRDAutorRow(frdRow, caRow); else createIndexFRDCARow(frdRow, caRow, selector); }); } }