private void QL_PROFILE_Load(object sender, EventArgs e) { BLL.Profile_BLL profile_BLL = new BLL.Profile_BLL(); event_end(); dataGridView1.DataSource = profile_BLL.getAll(); dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; }
private void init() { BLL.Profile_BLL profile_BLL = new BLL.Profile_BLL(); event_end(); dataGridView1.DataSource = profile_BLL.getAll(); resetText(); }
private void btnSave_Click(object sender, EventArgs e) { BLL.Profile_BLL profile_BLL = new BLL.Profile_BLL(); if (command == 1) { profile_BLL.insert(txtName.Text, txtSession.Text, txtConnect.Text, txtIdle.Text); } else if (command == 2) { txtName.Enabled = true; profile_BLL.update(txtName.Text, txtSession.Text, txtConnect.Text, txtIdle.Text); } init(); }
private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { currentRow = e.RowIndex; string name = dataGridView1.CurrentRow.Cells[1].Value.ToString(); txtName.Text = name; btnUpdate.Enabled = true; btnDelete.Enabled = true; BLL.Profile_BLL profile_BLL = new BLL.Profile_BLL(); DataTable table = profile_BLL.getOne(txtName.Text); txtSession.Text = table.Rows[0].ItemArray[1].ToString(); txtIdle.Text = table.Rows[1].ItemArray[1].ToString(); txtConnect.Text = table.Rows[2].ItemArray[1].ToString(); }
private void btnDelete_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("Do you want to delete profile?", "Confirmation", MessageBoxButtons.OKCancel); if (result == DialogResult.OK) { BLL.Profile_BLL profile_BLL = new BLL.Profile_BLL(); profile_BLL.delete(txtName.Text); } else { // code xu li } init(); }
private void init() { BLL.User_BLL user_BLL = new BLL.User_BLL(); dataGridView1.DataSource = user_BLL.getAll(); BLL.Profile_BLL profile_BLL = new BLL.Profile_BLL(); BLL.TBS_BLL tBS_BLL = new BLL.TBS_BLL(); cbProfile.Items.Clear(); foreach (DataRow row in profile_BLL.getAll().Rows) { cbProfile.Items.Add(row.ItemArray[1]); } cbProfile.SelectedIndex = 0; cbtablespace.Items.Clear(); foreach (DataRow row in tBS_BLL.getAll().Rows) { cbtablespace.Items.Add(row.ItemArray[1]); } cbtablespace.SelectedIndex = 0; event_end(); dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; }
private void Profile_Detail_Load(object sender, EventArgs e) { BLL.Profile_BLL role_BLL = new BLL.Profile_BLL(); dataGridView1.DataSource = role_BLL.getDetailProfile(profile); dataGridView1.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.Fill; }