Пример #1
0
        private void Btnsua_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Object id          = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Id");
            Object tenDangNhap = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "TenDangNhap");
            Object matKhau     = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "MatKhau");
            Object ten         = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Ten");
            Object tmail       = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Email");
            Object ngayThamgia = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "NgayThamgia");
            Object diachi      = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Diachi");
            Object idQuyen     = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "IdQuyen");
            Object gioitinh    = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Gioitinh");
            Object nganhang    = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Nganhang");
            Object sotk        = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Sotk");
            Object sodienthoai = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Sodienthoai");

            Nhansu nhansu = new Nhansu()
            {
                Id          = (int)id,
                TenDangNhap = tenDangNhap.ToString(),
                MatKhau     = nhansuDao.Laypasswork((int)id),
                Ten         = ten.ToString(),
                Email       = tmail.ToString(),
                NgayThamgia = ngayThamgia.ToString(),
                Diachi      = diachi.ToString(),
                IdQuyen     = (int)idQuyen,
                Gioitinh    = gioitinh.ToString(),
                Nganhang    = nganhang.ToString(),
                Sotk        = (long)sotk,
                Sodienthoai = (int)sodienthoai
            };
            Themsuanguoidung themsuanhansu = new Themsuanguoidung(nhansu, Idmh);

            themsuanhansu.Show();
            themsuanhansu.khicapnhat += Themsuanhansu_khicapnhat;
        }
Пример #2
0
        private void Btnthem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Themsuanguoidung themsuanhansu = new Themsuanguoidung(Role, Idmh);

            themsuanhansu.Show();
            themsuanhansu.khicapnhat += Themsuanhansu_khicapnhat;
        }