示例#1
0
        /// <summary>
        /// In forms constructor the not necessarily labels, tetxboxes and comboboxes are hiding
        /// from the form. Then the combobox for users(CmbDays) is filling with the usernames and NAMES
        /// from table users.
        /// </summary>
        public EditDays()
        {
            InitializeComponent();
            label2.Hide();
            TbxDays.Hide();

            CmbDays.DataSource    = DCom.GetData("SELECT * FROM days");
            CmbDays.DisplayMember = "Name";
            CmbDays.ValueMember   = "Name";
        }
示例#2
0
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            TbxDays.Show();
            BtnEdit.Show();
            label2.Show();
            label3.Hide();
            CmbDays.Hide();
            BtnSelect.Hide();

            SelectedData = DCom.GetData(String.Format(SqlExec, CmbDays.SelectedValue));
            TbxDays.Text = (string)SelectedData.Rows[0]["Name"];
        }