Пример #1
0
        private void Btnthem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Themsuakhachhang themsuakhachhang = new Themsuakhachhang();

            themsuakhachhang.Show();
            themsuakhachhang.khicapnhat += Themsuanhansu_khicapnhat;
        }
Пример #2
0
        private void Btnxoa_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Object id          = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Id");
            Object ten         = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Ten");
            Object tmail       = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Email");
            Object ngaysinh    = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Ngaysinh");
            Object diachi      = gridView1.GetRowCellValue(gridView1.FocusedRowHandle, "Diachi");
            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");

            Khachhang nhansu = new Khachhang()
            {
                Id          = (int)id,
                Ten         = ten.ToString(),
                Email       = tmail.ToString(),
                Ngaysinh    = ngaysinh.ToString(),
                Diachi      = diachi.ToString(),
                Gioitinh    = gioitinh.ToString(),
                Nganhang    = nganhang.ToString(),
                Sotk        = (long)sotk,
                Sodienthoai = (int)sodienthoai
            };
            Themsuakhachhang themsuakhachhang = new Themsuakhachhang(nhansu);

            themsuakhachhang.Show();
            themsuakhachhang.khicapnhat += Themsuanhansu_khicapnhat;
        }
Пример #3
0
        private void EditorButton_Click(object sender, EventArgs e)
        {
            Themsuakhachhang themsuakhachhang = new Themsuakhachhang();

            themsuakhachhang.Show();
            themsuakhachhang.khicapnhat += Themsuakhachhang_khicapnhat;
        }