Esempio n. 1
0
        private void frm_quanLyDuAn_Load(object sender, EventArgs e)
        {
            dtmToday.Value = DateTime.Today;

            btnQuanLyDuAn.Normalcolor = Color.FromArgb(39, 99, 109);
            if (listDuAn == null)
            {
                BindingSourceDuAn.DataSource = _duAn.GetAllList();
                dgv_duAn.DataSource          = BindingSourceDuAn;
                foreach (var item in _duAn.GetAllList())
                {
                    dataTable.Rows.Add(item.MaDuAn, item.TenDuAn, item.NgayBatDau, item.NgayKetThuc, item.TienDo, item.TrangThai);
                }
                LoadDgvDuAn();
            }
            else if (listDuAn != null)
            {
                dgv_duAn.DataSource = listDuAn;
                LoadDgvDuAn();
            }
        }
Esempio n. 2
0
        private void frm_themCongViec_Load(object sender, EventArgs e)
        {
            this.Location = new Point(55, 42);
            List <eDuAn> listDuAn = new List <eDuAn>();

            foreach (eDuAn i in busDuAn.GetAllList())
            {
                i.TenDuAn = "[" + i.MaDuAn + "] " + i.TenDuAn;
                listDuAn.Add(i);
            }

            // Gan danh sach Du An cho combobox
            cboDuAn.DisplayMember = "TenDuAn";
            cboDuAn.ValueMember   = "MaDuAn";
            cboDuAn.DataSource    = listDuAn;

            // Gan trang thai
            cboTrangThai.DataSource = new string[] { "Chưa thực hiện", "Đang thực hiện", "Hoàn thành" };
        }
Esempio n. 3
0
        private void frm_themHopDong_Load(object sender, EventArgs e)
        {
            this.Location            = new Point(55, 42);
            nudGiaTriHopDong.Maximum = Decimal.MaxValue;

            // Xet toa do cho frm Hop Dong
            this.Location = new Point(55, 42);

            // Lay danh sach Du An, dong thoi xu ly TenDuAn thanh ma + ten
            List <eDuAn> listDuAn = new List <eDuAn>();

            foreach (eDuAn i in busDuAn.GetAllList())
            {
                i.TenDuAn = "[" + i.MaDuAn + "] " + i.TenDuAn;
                listDuAn.Add(i);
            }

            // Gan danh sach Du An cho combobox
            cboDuAn.DisplayMember = "TenDuAn";
            cboDuAn.ValueMember   = "MaDuAn";
            cboDuAn.DataSource    = listDuAn;
        }