private void RefreshDataSource() { oTrinhDo = new TrinhDo(); DataTable dt = oTrinhDo.GetTrinhDoList(); if (dt != null) { PrepareDataSource(dt); EditDtgInterface(); } }
private void QLNS_TrinhDo_Load(object sender, EventArgs e) { DataTable dt = oTrinhDo.GetTrinhDoList(); if (dt != null) { PrepareDataSource(dt); EditDtgInterface(); } ResetInterface(true); }
private void LoadCboTrinhDo() { DataTable dt = trinhdo.GetTrinhDoList(); DataRow dr = dt.NewRow(); dr["ten"] = ""; dr["mo_ta"] = ""; dr["id"] = -1; dt.Rows.InsertAt(dr, 0); comB_TrinhDo.DataSource = dt; comB_TrinhDo.DisplayMember = "ten"; comB_TrinhDo.ValueMember = "id"; }