Beispiel #1
0
        private void Login_Load(object sender, EventArgs e)

        {
            login = new List <string[]>();
            dgvLogin.DataSource = Account_BUS.ListAccount();
            for (int i = 0; i < gridLogin.RowCount; i++)
            {
                string[] c = new string[3];
                c[0] = gridLogin.GetDataRow(i)["IDAccount"].ToString().TrimEnd();
                c[1] = gridLogin.GetDataRow(i)["Pass"].ToString().TrimEnd();
                c[2] = gridLogin.GetDataRow(i)["Position"].ToString().TrimEnd();
                login.Add(c);
            }
        }
Beispiel #2
0
 private void editAccount_Click(object sender, EventArgs e)
 {
     if (gridAccount.RowCount > 0)
     {
         DataRow row = gridAccount.GetDataRow(gridAccount.GetSelectedRows()[0]);
         EditAccount.oldInfo = row;
         EditAccount edit = new EditAccount();
         edit.ShowDialog();
         dgvListAccount.DataSource = Account_BUS.ListAccount();
     }
     else
     {
         MessageBox.Show("Error!", "My Application", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
     }
 }
Beispiel #3
0
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     dgvListAccount.DataSource = Account_BUS.ListAccount();
 }
Beispiel #4
0
 private void ListAccount_Load(object sender, EventArgs e)
 {
     dgvListAccount.DataSource = Account_BUS.ListAccount();
 }