public Subsidies_Bills(int Engineer_ID) { InitializeComponent(); Subsidies_Person SP1 = new Subsidies_Person(); SP1.Engineer_ID1 = Engineer_ID; SB.Engineer_ID1 = Engineer_ID; SP1.Subsidy_ID1 = 2; DataTable dt1 = SP1.ViewAll_Recommended_Person(); List <string> Recommended1 = new List <string>(); DataRow dr1; for (int i = 0; i < dt1.Rows.Count; i++) { dr1 = dt1.Rows[i]; Recommended1.Add(dr1.ItemArray[0].ToString()); } comboBox_Choose_Name_To_Search_T2.ItemsSource = Recommended1; Subsidies_Person SP2 = new Subsidies_Person(); SP2.Engineer_ID1 = Engineer_ID; SP2.Subsidy_ID1 = 1; DataTable dt2 = SP2.ViewAll_Recommended_Person(); List <string> Recommended2 = new List <string>(); DataRow dr2; for (int i = 0; i < dt2.Rows.Count; i++) { dr2 = dt2.Rows[i]; Recommended2.Add(dr2.ItemArray[0].ToString()); } comboBox_Choose_Name_To_Search_T3.ItemsSource = Recommended2; }
public Recommended_pepole(int Engineer_ID) { InitializeComponent(); Subsidies_Person SB = new Subsidies_Person(); SB.Engineer_ID1 = Engineer_ID; DataTable dt = SB.ViewAll_Subsidies_Person(); dataGrid.ItemsSource = dt.DefaultView; }