Ejemplo n.º 1
0
 private void FrmTuyChonMatHang_Load(object sender, EventArgs e)
 {
     blThucPham     = new BL_ThucPham(this);
     blLoaiThucPham = new BL_LoaiThucPham(this);
     blNhaCungCap   = new BL_NhaCungCap(this);
     //Load combobox Loại Thực phẩm
     cbxLoaiThucPham.DataSource    = blLoaiThucPham.LayDanhSachLoaiThucPham();
     cbxLoaiThucPham.DisplayMember = "TenLoaiThucPham";
     cbxLoaiThucPham.ValueMember   = "ID_LOAITHUCPHAM";
     //Load combobox nhà cung cấp
     cbxNhaCungCap.DataSource    = blNhaCungCap.LayDuLieuNhaCungCap();
     cbxNhaCungCap.DisplayMember = "TenNhaCungCap";
     cbxNhaCungCap.ValueMember   = "ID_NhaCungCap";
     if (v != 1)
     {
         txtIDMatHang.Text             = dataGridViewRow.Cells["IDTHUCPHAM"].Value.ToString();
         cbxLoaiThucPham.SelectedValue = Int32.Parse(dataGridViewRow.Cells["ID_LOAITHUCPHAM"].Value.ToString());
         txtTenThucPham.Text           = dataGridViewRow.Cells["TenThucPham"].Value.ToString();
         txtDonViTinh.Text             = dataGridViewRow.Cells["DonViTinh"].Value.ToString();
         txtDonGia.Text = dataGridViewRow.Cells["GiaBan"].Value.ToString();
         cbxNhaCungCap.SelectedValue = Int32.Parse(dataGridViewRow.Cells["ID_NHACUNGCAP"].Value.ToString());
     }
 }
Ejemplo n.º 2
0
 public FrmTuyChonNhaCungCap(DataGridViewRow dataGridViewRow)
 {
     InitializeComponent();
     this.dataGridViewRow = dataGridViewRow;
     blNhaCungCap         = new BL_NhaCungCap(this);
 }
Ejemplo n.º 3
0
 public FrmTuyChonNhaCungCap()
 {
     InitializeComponent();
     blNhaCungCap = new BL_NhaCungCap(this);
 }
Ejemplo n.º 4
0
 public FrmDanhMucNhaCungCap()
 {
     InitializeComponent();
     blNhaCungCap = new BL_NhaCungCap(this);
 }