Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {


            var frm = new frmAddAcc(0);
            this.ParentForm.Opacity = .55;
            frm.ShowDialog();
            this.ParentForm.Opacity = 1;
            dgvListAcc.DataSource = BUS_Account.GetAllAccount();


        }
Ejemplo n.º 2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            DataGridViewSelectedRowCollection r = dgvListAcc.SelectedRows;
            if (r.Count == 1)
            {
                int key = Convert.ToInt32(r[0].Cells["Column1"].Value.ToString());
                var frm = new frmAddAcc(key);
                this.ParentForm.Opacity = .55;
                frm.ShowDialog();
                this.ParentForm.Opacity = 1;
                dgvListAcc.DataSource = BUS_Account.GetAllAccount();


            }
            else
            {
                Alert("Hãy chọn dòng cần sửa", frmAlert.Type.Info);
            }


        }