Beispiel #1
0
        public ComboValueTypeReturnIndex(int iStartIndex, DataTable dt)
        {
            m_control            = new EAPComboBox();
            m_control.AutoSearch = true;

            m_control.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;

            this.iStartIndex = iStartIndex;

            try
            {
                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    DataRow dat = dt.Rows[i];
                    if (!dat.IsNull(0) && dat[0] != DBNull.Value && dat[0].ToString() != "")
                    {
                        m_control.Items.Add(dat[0]);
                    }
                }

                if (m_control.Items.Count > 0)
                {
                    m_control.SelectedIndex = 0;
                }
            }
            catch (Exception ex)
            {
                MessageDialog.ShowSystemErrorMsg(null, ex);
            }
        }
Beispiel #2
0
        public ComboValueType(params string[] values)
        {
            m_control            = new EAPComboBox();
            m_control.AutoSearch = true;

            m_control.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
            m_control.Items.AddRange(values);

            if (m_control.Items.Count > 0)
            {
                m_control.SelectedIndex = 0;
            }
        }
Beispiel #3
0
        public YesNoComboValueType()
        {
            m_control            = new EAPComboBox();
            m_control.AutoSearch = true;

            m_control.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            m_control.Items.AddRange(new object[] { "YES", "NO" });

            // Add by Wirachai T. 2007/06/18
            if (m_control.Items.Count > 0)
            {
                m_control.SelectedIndex = 0;
            }
        }
Beispiel #4
0
        public ComboValueTypeReturnIndex(int iStartIndex, params string[] values)
        {
            m_control            = new EAPComboBox();
            m_control.AutoSearch = true;

            m_control.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            m_control.Items.AddRange(values);

            if (m_control.Items.Count > 0)
            {
                m_control.SelectedIndex = 0;
            }

            this.iStartIndex = iStartIndex;
        }
Beispiel #5
0
        public ComboValueType(ArrayList values)
        {
            m_control = new EAPComboBox();

            m_control.AutoSearch = true;

            m_control.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDown;
            foreach (string data in values)
            {
                m_control.Items.Add(data);
            }
            if (m_control.Items.Count > 0)
            {
                m_control.SelectedIndex = 0;
            }
        }