private void btn_addwork_Click(object sender, EventArgs e)
        {
            if (cbo_employee.SelectedIndex == -1)
            {
                MessageBox.Show("Please select an employee.");
                cbo_employee.DroppedDown = true;
                return;
            }
            if (isEmp != cbo_employee.SelectedValue.ToString() && isBtnGo)
            {
                MessageBox.Show("Invalid selection of employee.");
                return;
            }

            isnew = true;

            t_addSched add = new t_addSched(this, true);

            add.ShowDialog();
        }
        private void btn_updwork_Click(object sender, EventArgs e)
        {
            if (cbo_employee.SelectedIndex == -1)
            {
                MessageBox.Show("Please select an employee.");
                cbo_employee.DroppedDown = true;
                return;
            }
            if (isEmp != cbo_employee.SelectedValue.ToString() && isBtnGo)
            {
                MessageBox.Show("Invalid selection of employee.");
                return;
            }

            try
            {
                int    r      = dgv_list.CurrentRow.Index;
                String status = dgv_list["dgvl_date", r].Value.ToString();

                if (dgv_list.Rows.Count > 1 && !String.IsNullOrEmpty(status))
                {
                    try
                    {
                        t_addSched add = new t_addSched(this, false);
                        add.ShowDialog();
                    }
                    catch { }
                }
                else
                {
                    MessageBox.Show("No schedule selected.");
                }
            }
            catch
            {
                MessageBox.Show("No schedule selected.");
            }
        }