コード例 #1
0
 public ucQLKhachHang()
 {
     InitializeComponent();
     if (frmLogin.rule == "admin")
     {
         btnThemKhachHang.Enabled = false;
         btnSuaKhachHang.Enabled  = false;
     }
     btnKhoaCapNhat.Enabled = false;
     btnKhoaThem.Enabled    = false;
     Lock();
     txtCongNo.ReadOnly = true;
     dgvDanhSachKhachHang.DataSource = khachhangController.GetAllKhachhang();
 }
コード例 #2
0
        void load()
        {
            DataTable dt = sanPham.GetAllSanPham();

            foreach (DataRow row in dt.Rows)
            {
                cbbTenSanPham.Items.Add(row[1]);
            }
            dt = khachhang.GetAllKhachhang();
            foreach (DataRow row in dt.Rows)
            {
                cbbTenKhachHang.Items.Add(row[1]);
            }
        }