Пример #1
0
        private void btnCapNhat_Click(object sender, EventArgs e)
        {
            List <CongTyDoVe> lst = ((BindingList <CongTyDoVe>)dgvCongTyDoVe.DataSource).ToList();

            ProcessData.SaveCongTyDoVe(lst);
            lst = ProcessData.GetAllCongTyDoVe();
            dgvCongTyDoVe.DataSource = new BindingList <CongTyDoVe>(lst);
            MessageBox.Show("Cập nhật thành công!", "Thông báo", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Пример #2
0
        public FormThongKeTheoCongTyDoVe()
        {
            InitializeComponent();
            dgvData.AutoGenerateColumns = false;
            _bindingSource     = new BindingSource();
            dgvData.DataSource = _bindingSource;

            List <CongTyDoVe> lst = ProcessData.GetAllCongTyDoVe();

            foreach (CongTyDoVe item in lst)
            {
                checkComboboxCTDV.Properties.Items.Add(item.CongTyDoVeId, item.TenCongTyDoVe);
            }
        }
Пример #3
0
        private void FormCongTyDoVe_Load(object sender, EventArgs e)
        {
            List <CongTyDoVe> lst = ProcessData.GetAllCongTyDoVe();

            dgvCongTyDoVe.DataSource = new BindingList <CongTyDoVe>(lst);
        }