Esempio n. 1
0
        public void HienTatCaNguyenLieu()
        {
            List <NguyenLieuDTO> lsNguyenLieu = NguyenLieuBUS.LayDanhSachNguyenLieu();

            rpvBaoCao.LocalReport.ReportEmbeddedResource = path + "rptTatCaNguyenLieu.rdlc";
            rpvBaoCao.LocalReport.DataSources.Add(new ReportDataSource("DSNGUYENLIEU", lsNguyenLieu));
            rpvBaoCao.RefreshReport();
        }
        private void FrmQuanLyKho_FormClosed(object sender, FormClosedEventArgs e)
        {
            ((FrmMain)this.ParentForm).TopMost = FrmMain.topMost;
            List <NguyenLieuDTO> lsNguyenLieu = NguyenLieuBUS.LayDanhSachNguyenLieu();

            LoadBangChonNhanh(lsNguyenLieu);
            LoadDanhSachNguyenLieu(lsNguyenLieu);

            if (cmbNguyenLieu.Items.Count > 0)
            {
                btnThem.Enabled = true;
            }
            else
            {
                btnThem.Enabled = false;
            }
        }
        private void FrmNhapHang_Load(object sender, EventArgs e)
        {
            grvBangChonNhanh.AutoGenerateColumns = false;

            List <NguyenLieuDTO> lsNguyenLieu = NguyenLieuBUS.LayDanhSachNguyenLieu();

            LoadBangChonNhanh(lsNguyenLieu);
            LoadDanhSachNguyenLieu(lsNguyenLieu);
            LoadNhaCungCap();

            lblMaPhieu.Text  = PhieuNhapBUS.LayMaPhieuNhapMoiNhat() + 1 + "";
            dtpNgayLap.Value = DateTime.Now;

            LamMoi();

            if (cmbNguyenLieu.Items.Count > 0)
            {
                btnThem.Enabled = true;
            }
            else
            {
                btnThem.Enabled = false;
            }
        }
        private void dgvCTPhieuNhap_RowsAdded(object sender, DataGridViewRowsAddedEventArgs e)
        {
            ((DataGridViewComboBoxCell)dgvCTPhieuNhap.Rows[e.RowIndex].Cells["colMaNguyenLieu"]).DataSource    = NguyenLieuBUS.LayDanhSachNguyenLieu();
            ((DataGridViewComboBoxCell)dgvCTPhieuNhap.Rows[e.RowIndex].Cells["colMaNguyenLieu"]).DisplayMember = "TenNguyenLieu";
            ((DataGridViewComboBoxCell)dgvCTPhieuNhap.Rows[e.RowIndex].Cells["colMaNguyenLieu"]).ValueMember   = "MaNguyenLieu";

            lblTongTien.Text    = TinhTongTien().ToString("#,##0đ");
            btnNhapHang.Enabled = true;
        }
Esempio n. 5
0
        // Bắt đầu khu vực chức năng Quản lý nguyên liệu

        private void NL_LoadDanhSachNguyenLieu(string timKiem = "")
        {
            List <NguyenLieuDTO> lsNguyenLieu = NguyenLieuBUS.LayDanhSachNguyenLieu(timKiem);

            dgvNguyenLieu.DataSource = lsNguyenLieu;
        }