Example #1
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"];
        }
Example #2
0
        /// <summary>
        /// In forms constructor the not necessarily labels, tetxboxes and comboboxes are hiding
        /// from the form. Then the combobox for work hours(CmbWorkHours) is filling with the ID of work hours.
        /// </summary>
        public EditWorkHours()
        {
            InitializeComponent();

            LblDays.Hide();
            LblEndTime.Hide();
            LblStartTime.Hide();
            DtpEndTime.Hide();
            DtpStartTime.Hide();
            CmbDays.Hide();
            BtnEdit.Hide();

            CmbWorkHours.DataSource    = DCom.GetData("SELECT * FROM work_hours");
            CmbWorkHours.DisplayMember = "ID";
            CmbWorkHours.ValueMember   = "ID";
        }