void FrmHangHoaDanhMuc_Load(object sender, EventArgs e)
 {
     tlDanhMuc.DataSource = busDanhMuc.GetAll();
     if (tlDanhMuc.AllNodesCount > 0)
     {
         category cat = (category)tlDanhMuc.GetDataRecordByNode(tlDanhMuc.Nodes[0]);
         dgvHangHoa.DataSource = busHangHoa.GetByCat(cat);
     }
 }
Example #2
0
 void FrmDanhMuc_Load(object sender, System.EventArgs e)
 {
     dgvNhaCungCap.DataSource        = busNhaCungCap.GetAll();
     lkDanhMuc.Properties.DataSource = busDanhMuc.GetAll();
     dgvSanPham.DataSource           = busHangHoa.GetAll();
     btnLuu.Enabled = false;
 }
 private void FrmDanhMucHoaDon_Load(object sender, EventArgs e)
 {
     lkKhachHang.Properties.DataSource = busKhachHang.GetAll();
     lkNhanVien.Properties.DataSource  = busNhanVien.GetAll();
     dgvHoaDon.DataSource = busHoaDon.GetAllBill();
     lkDanhMucSP.Properties.DataSource = busDanhMuc.GetAll();
     dgvSanPham.DataSource             = busHangHoa.GetAll();
     panelControl4.Enabled             = false;
 }
Example #4
0
 private void FrmBaoGia_Load(object sender, EventArgs e)
 {
     dgvPhieuBaoGia.DataSource         = busHoaDon.GetAllPrice();
     lkDanhMucSP.Properties.DataSource = busDanhMuc.GetAll();
     dgvSanPham.DataSource             = busHangHoa.GetAll();
     panelControl4.Enabled             = false;
     lkKhachHang.Properties.DataSource = busKhachHang.GetAll();
     lkNhanVien.Properties.DataSource  = busNhanVien.GetAll();
 }
Example #5
0
 private void FrmDanhMuc_Load(object sender, EventArgs e)
 {
     dgvPhieuNhapHang.DataSource        = busNhapHang.GetAll();
     lkDanhMucSP.Properties.DataSource  = busDanhMuc.GetAll();
     lkNhaCungCap.Properties.DataSource = busNhaCungCap.GetAll();
     lkNhanVien.Properties.DataSource   = busNhanVien.GetAll();
     dgvSanPham.DataSource = busHangHoa.GetAll();
     Enable(false);
 }
Example #6
0
 void FrmSuaDanhMuc_Load(object sender, EventArgs e)
 {
     if (Cat == null)
     {
         return;
     }
     lkDanhMucCha.Properties.DataSource = busDanhMuc.GetAll();
     txtMaDanhMuc.Text      = Cat.cat_id;
     txtTenDanhMuc.Text     = Cat.name;
     txtMoTa.Text           = Cat.describe;
     lkDanhMucCha.EditValue = Cat.category1;//chỗ này
 }
Example #7
0
 private void FrmSuaSanPham_Load(object sender, EventArgs e)
 {
     if (p == null)
     {
         return;
     }
     lkDanhMucSP.Properties.DataSource = busDanhMuc.GetAll();
     txtMaSanPham.Text     = p.id;
     txtTenSanPham.Text    = p.name;
     txtDonViTinh.Text     = p.unit;
     txtDonGia.Text        = p.price.ToString();
     txtBaoHanh.Text       = p.warranty.ToString();
     txtMoTa.Text          = p.describe;
     numSoLuong.Value      = p.quantity;
     lkDanhMucSP.EditValue = p.cat_id;
 }
Example #8
0
 private void FrmThemSanPham_Load(object sender, EventArgs e)
 {
     lkDanhMucSP.Properties.DataSource = busDanhMuc.GetAll();
     txtMaSanPham.Text = busDanhMuc.getMa();
 }
Example #9
0
 void FrmThemDanhMuc_Load(object sender, EventArgs e)
 {
     lkDanhMucCha.Properties.DataSource = busDanhMuc.GetAll();
     txtMaDanhMuc.Text = busDanhMuc.getMa();
 }