Ejemplo n.º 1
0
 public static bool XoaLoaiTaiKhoan(int maLoaiTaiKhoan)
 {
     if (TaiKhoanBUS.XoaTaiKhoanTheoLoai(maLoaiTaiKhoan))
     {
         //if (ChucNang_LoaiTaiKhoanBUS.XoaChucNang_LoaiTaiKhoan(maLoaiTaiKhoan))
         //{
         return(LoaiTaiKhoanDAO.XoaLoaiTaiKhoan(maLoaiTaiKhoan));
         //}
     }
     return(false);
 }
Ejemplo n.º 2
0
        //0712467
        private void bt_PT_Tim_Click(object sender, EventArgs e)
        {
            if (KiemTraHopLeDuLieuNhapPanelPhongToa() == true)
            {
                if (tb_PT_MaTK.Text != "")
                {
                    TaiKhoanDTO tkDto = TaiKhoanBUS.TimTaiKhoan(tb_PT_MaTK.Text.Trim());
                    List<TaiKhoanDTO> lst = new List<TaiKhoanDTO>();
                    lst.Add(tkDto);
                    dtgv_PT_DanhSach.DataSource = lst;

                }
                else
                {
                    TaiKhoanBUS tkBus = new TaiKhoanBUS();
                    KhachHangDTO khDto = new KhachHangDTO();

                    if (tb_PT_CMND.Text != "")
                    {
                        khDto.CMND = tb_PT_CMND.Text;
                    }
                    if (tb_PT_HoTen.Text != "")
                    {
                        khDto.HoTen = tb_PT_HoTen.Text;
                    }

                    List<KhachHangDTO> lstKH = KhachHangBUS.TimKhachHang(khDto);
                    dtgv_PT_DanhSach.DataSource = TaiKhoanBUS.TimDSTaiKhoan(lstKH);
                }
                //hien thong tin len datagridview
                if (dtgv_PT_DanhSach.DataSource != null)
                {
                    dtgv_PT_DanhSach.Columns["MaTK"].Visible = true;
                    dtgv_PT_DanhSach.Columns["MaLoaiTK"].Visible = false;
                    dtgv_PT_DanhSach.Columns["MaKH"].Visible = false;
                    dtgv_PT_DanhSach.Columns["NgayBatDau"].Visible = true;
                    dtgv_PT_DanhSach.Columns["NgayKetThuc"].Visible = true;
                    dtgv_PT_DanhSach.Columns["SoDuCo"].Visible = false;
                    dtgv_PT_DanhSach.Columns["SoDuNo"].Visible = false;
                    dtgv_PT_DanhSach.Columns["SoDu"].Visible = true;
                    dtgv_PT_DanhSach.Columns["TinhTrang"].Visible = true;
                    dtgv_PT_DanhSach.Columns["LoaiTienTe"].Visible = false ;
                    dtgv_PT_DanhSach.Columns["MaChiNhanh"].Visible = false;
                }
                else
                {
                    MessageBox.Show("Không tìm thấy tài khoản thỏa thông tin tìm kiếm");
                }
            }
        }
Ejemplo n.º 3
0
        //0712467
        private void bt_DTK_Tim_Click(object sender, EventArgs e)
        {
            if (KiemTraHopLeDuLieuNhapPanelDongTaiKhoan() == true)
            {
                if (tb_DTK_MaTK.Text != "")
                {
                    TaiKhoanDTO tkDto = TaiKhoanBUS.TimTaiKhoan(tb_DTK_MaTK.Text.Trim());
                    List<TaiKhoanDTO> lst = new List<TaiKhoanDTO>();
                    lst.Add(tkDto);
                    dtgv_DTK_DanhSach.DataSource = tkDto;
                }
                else
                {
                    TaiKhoanBUS tkBus = new TaiKhoanBUS();
                    KhachHangDTO khDto = new KhachHangDTO();

                    if (tb_DTK_CMND.Text != "")
                    {
                        khDto.CMND = tb_DTK_CMND.Text;
                    }
                    if (tb_DTK_HoTen.Text != "")
                    {
                        khDto.HoTen = tb_DTK_HoTen.Text;
                    }

                    List<KhachHangDTO> lstKH = KhachHangBUS.TimKhachHang(khDto);
                    dtgv_DTK_DanhSach.DataSource = TaiKhoanBUS.TimDSTaiKhoan(lstKH);
                }
                //hien thong tin len datagridview
                dtgv_DTK_DanhSach.Columns["MaTK"].Visible = true;
                dtgv_DTK_DanhSach.Columns["MaLoaiTK"].Visible = false;
                dtgv_DTK_DanhSach.Columns["MaKH"].Visible = false;
                dtgv_DTK_DanhSach.Columns["NgayBatDau"].Visible = true;
                dtgv_DTK_DanhSach.Columns["NgayKetThuc"].Visible = true;
                dtgv_DTK_DanhSach.Columns["SoDuCo"].Visible = false;
                dtgv_DTK_DanhSach.Columns["SoDuNo"].Visible = false;
                dtgv_DTK_DanhSach.Columns["SoDu"].Visible = true;
                dtgv_DTK_DanhSach.Columns["TinhTrang"].Visible = true;
               dtgv_DTK_DanhSach.Columns["LoaiTienTe"].Visible = true;
                dtgv_DTK_DanhSach.Columns["LoaiTienTe"].Visible = false;
                dtgv_DTK_DanhSach.Columns["MaChiNhanh"].Visible = false;
            }
        }