private void CaricaAlbero() { this.txtsCampus.DBDefaultValue = "%"; this.txtsCodice.DBDefaultValue = "%"; this.cmbsProvincia.DBDefaultValue = "0"; this.cmbsComune.DBDefaultValue = "0"; this.cmbsServizi.DBDefaultValue = "0"; this.txtsCampus.Text = this.txtsCampus.Text.Trim(); this.txtsCodice.Text = this.txtsCodice.Text.Trim(); S_ControlsCollection _SCollection = new S_ControlsCollection(); _SCollection.AddItems(this.PanelEdit.Controls); Classi.MailSend _MailSend = new TheSite.Classi.MailSend(); DataSet _MyDs = null; if (OptFiltro.Items[0].Selected) { _MyDs = _MailSend.GetEmailEdifici(_SCollection, itemId, "Tutti"); } if (OptFiltro.Items[1].Selected) { _MyDs = _MailSend.GetEmailEdifici(_SCollection, itemId, "Associati"); } if (OptFiltro.Items[2].Selected) { _MyDs = _MailSend.GetEmailEdifici(_SCollection, itemId, "NonAssociati"); } if (_MyDs.Tables[0].Rows.Count > 0) { TreeCtrl.Visible = true; ChkSelezionaLeft.Visible = true; PopolaTreeview(_MyDs); } else { TreeCtrl.Visible = false; ChkSelezionaLeft.Visible = false; } string totrecord = _MyDs.Tables[0].Rows.Count.ToString(); LblEdifici.Text = totrecord; ImpostaCheck(); }
private void CaricaListaRight() { Classi.MailSend _MailSend = new TheSite.Classi.MailSend(); DataSet _MyDs = _MailSend.GetEmailEdifici(itemId); // Imposto la chiave primaria _MyDs.Tables[0].Columns["id"].Unique = true; _MyDs.Tables[0].PrimaryKey = new DataColumn[] { _MyDs.Tables[0].Columns["id"] }; Session.Add("Edifici", _MyDs.Tables[0]); if (_MyDs.Tables[0].Rows.Count > 0) { DataView o_DvEdifici = new DataView(_MyDs.Tables[0]); this.ListBoxRightF.DataTextField = "descrizione"; this.ListBoxRightF.DataValueField = "id"; this.ListBoxRightF.DataSource = o_DvEdifici; this.ListBoxRightF.DataBind(); } string totrecord = _MyDs.Tables[0].Rows.Count.ToString(); LblEdificiAssociati.Text = totrecord; }