private void Form1_Load(object sender, EventArgs e) { try { CheckForIllegalCrossThreadCalls = false; xtraTabControl1.ShowTabHeader = DevExpress.Utils.DefaultBoolean.False; xtraTabControl1.SelectedTabPageIndex = 0; //xtraTabControl1.TabPages[0].PageVisible = false; //xtraTabControl1.TabPages[1].PageVisible = false; var listtip = data.S_Tip(-1, -1).ToList(); grdServisTipi.DataSource = listtip.Where(c => c.Ayirac == 1).ToList(); grdSablonTipi.DataSource = listtip.Where(c => c.Ayirac == 2).ToList(); grdCmbServisTipi.DataSource = listtip.Where(c => c.Ayirac == 1).ToList(); grdCmbSablonTipi.DataSource = listtip.Where(c => c.Ayirac == 2).ToList(); var listfirma = data.S_Firma(-1).ToList(); grdFirmaAdi.DataSource = listfirma; grdCmbFirma.DataSource = listfirma; var list = new BindingList <S_WebServisTanimlari_Result>(data.S_WebServisTanimlari(-1).ToList()); if (list.Count > 0) { grdTanimlar.DataSource = list; } } catch (Exception hata) { MessageBox.Show(hata.ToString()); throw; } }
public static void MutabakatAl(int FirmaID, int ServisTipi, int SablonTipi) { sqltestEntities data = new sqltestEntities(); var list = data.S_WebServisTanimlari(FirmaID).Where(c => c.ServisTipi_Tip1 == ServisTipi && c.ServisYonu == true).ToList(); string url = list.FirstOrDefault().URL; var tiplist = data.S_Tip(ServisTipi, -1).ToList(); string parametre = tiplist.FirstOrDefault().Parametre; Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); ConfigurationSectionGroup applicationSectionGroup = config.GetSectionGroup("applicationSettings"); ConfigurationSection applicationConfigSection = applicationSectionGroup.Sections["ConnectorV2.Properties.Settings"]; ClientSettingsSection clientSection = (ClientSettingsSection)applicationConfigSection; //Database Configuration Setting SettingElement applicationSetting = clientSection.Settings.Get(parametre); applicationSetting.Value.ValueXml.InnerXml = url; applicationConfigSection.SectionInformation.ForceSave = true; config.Save(ConfigurationSaveMode.Modified); ConfigurationManager.RefreshSection("applicationSettings"); string degisiklik = applicationSetting.Value.ValueXml.InnerXml; }