Beispiel #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            Btn_SaveSetting.Enabled   = true;
            Btn_UpdateSetting.Enabled = false;

            RText_User.ResetText();
            RText_Password.ResetText();
            Com_User.ResetText();
            DGV_Users.ClearSelection();
        }
        private void Btn_New_Click(object sender, EventArgs e)
        {
            Btn_Add.Enabled    = true;
            Btn_Update.Enabled = false;

            RText_User.ResetText();
            RText_Password.ResetText();
            Com_User.SelectedIndex = -1;
            DGV_Users.ClearSelection();
        }
        private void DGV_Users_DoubleClick(object sender, EventArgs e)
        {
            if (DGV_Users.SelectedRows.Count == 0)
            {
                return;
            }

            RText_User.Text     = DGV_Users.CurrentRow.Cells[1].Value.ToString();
            RText_Password.Text = DGV_Users.CurrentRow.Cells[2].Value.ToString();
            Com_User.Text       = DGV_Users.CurrentRow.Cells[3].Value.ToString();

            DGV_Users.ClearSelection();
            Btn_Update.Enabled = true;
            Enable_BtnAdd      = false;
            Btn_Add.Enabled    = false;
        }
Beispiel #4
0
 private void Users_Load(object sender, EventArgs e)
 {
     DGV_Users.ClearSelection();
 }
 private void Frm_Users_Load(object sender, EventArgs e)
 {
     RText_User.Focus();
     DGV_Users.ClearSelection();
 }