示例#1
0
 public void RefreshAndLocate提醒(Guid?entityID)
 {
     blv = 提醒.GetTX(context).Execute(System.Data.Objects.MergeOption.OverwriteChanges).ToBindingListView();//这里用NoTracking那么无法删除(因为context未保存对应记录);用AppendOnly那么当编辑后无法刷新
     提醒BindingSource.DataSource = blv;
     if (entityID != null)
     {
         提醒BindingSource.Position = blv.Find("ID", entityID);
     }
 }
示例#2
0
 private void ctFiltrarBuscar_TextChanged(object sender, System.EventArgs e)
 {
     if (!listAlumnosBindingSource.SupportsSearching)
     {
         return;
     }
     if (cvBuscar.Checked == true)
     {
         listAlumnosBindingSource.Position = vista.Find("NomAlumno", ctBuscar.Text);
     }
     else
     {
         ctBuscar.Text = "";
     }
 }
示例#3
0
 private void textBox4_TextChanged(object sender, EventArgs e)
 {
     if (!bs.SupportsSearching)
     {
         return;
     }
     if (checkBox2.Checked == true)
     {
         bs.Position =
             vista.Find("Nombre", textBox4.Text);
     }
     else
     {
         textBox4.Text = "";
     }
 }