public void m_GeneralCodeİnformations(DataGridView vrdgrGeneralCodeİnfomationsList, string vrSearchName, string vrGeneralCodeID, string vrGeneralCodeName) { StockTrackingDataContext = new L_StockTrackingERPDataContext(); if (vrSearchName == "İlçeler") { var GeneralCodeİnformations_Query2 = StockTrackingDataContext.p_GeneralCodeInformationSearch2(vrGeneralCodeID, vrGeneralCodeName); vrdgrGeneralCodeİnfomationsList.DataSource = GeneralCodeİnformations_Query2; vrdgrGeneralCodeİnfomationsList.Columns[0].HeaderText = "İlçe ID"; vrdgrGeneralCodeİnfomationsList.Columns[1].HeaderText = "İlçe Adı"; vrdgrGeneralCodeİnfomationsList.Columns[2].HeaderText = "İl Kodu"; vrdgrGeneralCodeİnfomationsList.Columns[3].HeaderText = "İl Adı"; vrdgrGeneralCodeİnfomationsList.Columns[4].HeaderText = "Ülke Kodu"; vrdgrGeneralCodeİnfomationsList.Columns[5].HeaderText = "Ülke Adı"; } else if (vrSearchName == "Ürün Tipi") { var GeneralCodeİnformations_Query3 = StockTrackingDataContext.p_GeneralCodeInformationSearch3(vrGeneralCodeID, vrGeneralCodeName); vrdgrGeneralCodeİnfomationsList.DataSource = GeneralCodeİnformations_Query3; vrdgrGeneralCodeİnfomationsList.Columns[0].HeaderText = "Ürün Tip ID"; vrdgrGeneralCodeİnfomationsList.Columns[1].HeaderText = "Ürün Tip Adı"; } else { var GeneralCodeİnformations_Query = StockTrackingDataContext.p_GeneralCodeInformationSearch(vrSearchName, vrGeneralCodeID, vrGeneralCodeName); vrdgrGeneralCodeİnfomationsList.DataSource = GeneralCodeİnformations_Query; if (vrSearchName == "Ülkeler") { vrdgrGeneralCodeİnfomationsList.Columns[0].HeaderText = "Ülke ID"; vrdgrGeneralCodeİnfomationsList.Columns[1].HeaderText = "Ülke Adı"; } else if (vrSearchName == "İller") { vrdgrGeneralCodeİnfomationsList.Columns[0].HeaderText = "İl ID"; vrdgrGeneralCodeİnfomationsList.Columns[1].HeaderText = "İl Kodu"; vrdgrGeneralCodeİnfomationsList.Columns[2].HeaderText = "İl Adı"; vrdgrGeneralCodeİnfomationsList.Columns[3].HeaderText = "Ülke Kodu"; vrdgrGeneralCodeİnfomationsList.Columns[4].HeaderText = "Ülke Adı"; } } }