Exemplo n.º 1
0
        private void LoadDSNL()
        {
            NguyenLieu_BUS        nl   = new NguyenLieu_BUS();
            List <NguyenLieu_DTO> dsnl = nl.LayDanhSachNguyenLieu();

            dataGridViewQLNguyenLieu.MultiSelect         = false;
            dataGridViewQLNguyenLieu.AutoGenerateColumns = false;
            dataGridViewQLNguyenLieu.DataSource          = dsnl;
            dataGridViewQLNguyenLieu.SelectionMode       = DataGridViewSelectionMode.FullRowSelect;
            //dataGridViewQlSanPham.ReadOnly = true;
            dataGridViewQLNguyenLieu.RowHeadersVisible = false;
        }
Exemplo n.º 2
0
        private void tabKho_SelectedIndexChanged(object sender, EventArgs e)
        {
            NhaCungCap_BUS ncc = new NhaCungCap_BUS();

            cbbNCC.DataSource    = ncc.LayDanhSachNhaCungCap();
            cbbNCC.DisplayMember = "TenNhaCC";
            cbbNCC.ValueMember   = "MaNhaCC";
            NguyenLieu_BUS nl = new NguyenLieu_BUS();

            cbbTenNL.DataSource    = nl.LayDanhSachNguyenLieu();
            cbbTenNL.DisplayMember = "TenNguyenLieu";
            cbbTenNL.ValueMember   = "MaNL";
            Load_fromNhapHang();
        }
Exemplo n.º 3
0
        private void cbbTenNL_SelectedIndexChanged(object sender, EventArgs e)
        {
            NguyenLieu_BUS nl = new NguyenLieu_BUS();

            listnl = nl.LayDanhSachNguyenLieu();

            for (int i = 0; i < listnl.Count; i++)
            {
                if (listnl[i].MaNL.ToString() == cbbTenNL.SelectedValue.ToString())
                {
                    txtDonGia.Text = listnl[i].DonGiaNL.ToString();
                }
            }

            TinhThanhTien();
        }