private void trwPhong_AfterSelect(object sender, TreeViewEventArgs e) { string msPhong; IEnumerable <tblMaytinh> dsMaytinhs; if (trwPhong.SelectedNode != null) { if (trwPhong.SelectedNode.Level == 1) { msPhong = trwPhong.SelectedNode.Tag.ToString(); txtPhong.Text = msPhong; dsMaytinhs = mt.GetMaytinhsThuocPhong(msPhong); LoadMayTinh(lvwMay, dsMaytinhs); } else if (trwPhong.SelectedNode.Level == 2) { tblMaytinh mtinh = null; mtinh = (tblMaytinh)trwPhong.SelectedNode.Tag; GanObjectToField(mtinh); } } }
private void detach_tblMaytinhs(tblMaytinh entity) { this.SendPropertyChanging(); entity.tblPhonghoc = null; }
partial void DeletetblMaytinh(tblMaytinh instance);
partial void UpdatetblMaytinh(tblMaytinh instance);
partial void InserttblMaytinh(tblMaytinh instance);
void GanObjectToField1(tblMaytinh mt) { txtPhong.Text = mt.msPhong; }