Ejemplo n.º 1
0
 private void LamMoi(bool state = true)
 {
     lblMaPhieu.Text  = PhieuNhapBUS.LayMaPhieuNhapMoiNhat() + 1 + "";
     dtpNgayLap.Value = DateTime.Now;
     txtSoLuong.Text  = txtDonGia.Text = string.Empty;
     btnThem.Enabled  = state;
     btnXoa.Enabled   = btnSua.Enabled = btnLamMoi.Enabled = !state;
 }
Ejemplo n.º 2
0
        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;
            }
        }