예제 #1
0
 private void SearchDiscipline(int code, string value)
 {
     if (code == 13 && cmBox_search.SelectedIndex == 0 && value != "" && EntitiesIndex == 4)
     {
         var disciplineService = new DisciplineService(_unit, _unit);
         var discipline        = disciplineService.GetDisciplineById(Convert.ToInt32(_tBox_searchValue));
         disciplineGV.DataSource = new List <Discipline>()
         {
             discipline
         };
     }
     if (code == 13 && cmBox_search.SelectedIndex == 1 && value != "")
     {
         var disciplineService = new DisciplineService(_unit, _unit);
         var discipline        = disciplineService.GetDisciplineByName(_tBox_searchValue);
         disciplineGV.DataSource = new List <Discipline>()
         {
             discipline
         };
     }
 }