private ListViewItem PopulateAssociacao(GISADataset.SFRDUnidadeFisicaRow sfrdufRow) { GISADataset.NivelRow nRow = null; GISADataset.TipoNivelRow tnRow = null; GISADataset.TipoNivelRelacionadoRow tnrRow = null; nRow = sfrdufRow.FRDBaseRow.NivelRow; tnRow = nRow.TipoNivelRow; tnrRow = (GISADataset.TipoNivelRelacionadoRow)(GisaDataSetHelper.GetInstance().TipoNivelRelacionado.Select(string.Format("ID = {0}", System.Convert.ToString(((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[1])))[0]); ListViewItem item = new ListViewItem(new string[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }); GISADataset.FRDBaseRow frdbaseRow = nRow.GetFRDBaseRows()[0]; item.SubItems.AddRange(new string[] { string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty }); item.ImageIndex = SharedResourcesOld.CurrentSharedResources.NivelImageBase(System.Convert.ToInt32(tnrRow.GUIOrder)); item.StateImageIndex = 0; item.SubItems[chCodigo.Index].Text = System.Convert.ToString(((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[8]); item.SubItems[chDesignacao.Index].Text = System.Convert.ToString(((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[0]); item.SubItems[chNivelDesc.Index].Text = tnrRow.Designacao; item.SubItems[chDatasProd.Index].Text = GISA.Utils.GUIHelper.FormatDate(((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[2].ToString(), ((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[3].ToString(), ((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[4].ToString(), false) + " - " + GISA.Utils.GUIHelper.FormatDate(((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[5].ToString(), ((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[6].ToString(), ((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[7].ToString(), false); item.SubItems[chCota.Index].Text = sfrdufRow["Cota"] == DBNull.Value ? "" : sfrdufRow.Cota; if (this.lstVwNiveisAssoc.Columns.Contains(this.chRequisitado)) { if (System.Convert.ToBoolean(((ArrayList)(detalhes[sfrdufRow.FRDBaseRow.IDNivel]))[10])) { item.SubItems[this.chRequisitado.Index].Text = "Sim"; } else { item.SubItems[this.chRequisitado.Index].Text = "Não"; } } item.Tag = sfrdufRow; return(item); }
private static bool IsSubTipoNivel(GISADataset.TipoNivelRow TipoNivelRow) { return TipoNivelRow.ID == TipoNivelRelacionado.SSC | TipoNivelRow.ID == TipoNivelRelacionado.SSR | TipoNivelRow.ID == TipoNivelRelacionado.SD; }