void CategoryListViewItemChanged(object sender, EventArgs e)
        {
            CodeGeneratorBase codeGenerator = SelectedCodeGenerator;

            if (codeGenerator == null)
            {
                return;
            }

            statusLabel.Text = StringParser.Parse(codeGenerator.Hint);
            selectionListBox.BeginUpdate();
            selectionListBox.Items.Clear();
            if (codeGenerator.Content.Count > 0)
            {
                Hashtable objs = new Hashtable();
//				selectionListBox.Sorted = codeGenerator.Content.Count > 1;
                foreach (object o in codeGenerator.Content)
                {
                    if (!objs.Contains(o.ToString()))
                    {
                        selectionListBox.Items.Add(o);
                        objs.Add(o.ToString(), "");
                    }
                }
                selectionListBox.SelectedIndex = 0;
            }
            selectionListBox.EndUpdate();
            selectionListBox.Refresh();
        }
Пример #2
0
        public bool LlenarCombo_Windows(System.Windows.Forms.CheckedListBox Generico)
        {
            if (!Validar())
            {
                return(false);
            }
            clsConexionBD objConecionBD = new clsConexionBD();

            objConecionBD.SQL         = strSQL;
            objConecionBD.NombreTabla = strNombreTabla;

            if (!objConecionBD.LlenarDataSet(false))
            {
                strError = objConecionBD.Error;
                objConecionBD.CerrarConexion();
                objConecionBD = null;
                return(false);
            }

            Generico.DataSource    = objConecionBD.MiDataSet.Tables[strNombreTabla];
            Generico.DisplayMember = strColumnaTexto;
            Generico.ValueMember   = strColumnaValor;
            Generico.Refresh();
            objConecionBD.CerrarConexion();
            objConecionBD = null;
            return(true);
        }
 public bool LlenarChkbL_Desktop(CheckedListBox Generico)
 {
     if (!Validar())
             return false;
         try
         {
             clsConexionBD objConexionBd = new clsConexionBD(strApp);
             objConexionBd.SQL = strSQL;
             if (!objConexionBd.LlenarDataSet(false))
             {
                 strError = objConexionBd.Error;
                 objConexionBd.CerrarCnx();
                 objConexionBd = null;
                 return false;
             }
             Generico.DataSource = objConexionBd.DataSet_Lleno.Tables[0];
             Generico.ValueMember = strCampoID;
             Generico.DisplayMember = strCampoTexto;
             Generico.Refresh();
             objConexionBd.CerrarCnx();
             objConexionBd = null;
             return true;
         }
         catch (Exception ex)
         {
             strError = ex.Message;
             return false;
         }
 }
 public void RefreshData()
 {
     objLayerList.Refresh();
     objShadowLayerList.Refresh();
     UpdatePropLabel();
 }