private void lc_DovizTuru_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) { if (e.Button.Index == 1) { try { CurrencyTypeList frm = new CurrencyTypeList(); frm.ShowDialog(); } catch (Exception ex) { } finally { _currencyTypes = _repository.Run <DefinitionsService, List <CurrencyTypeDTO> >(x => x.Get_List_CurrencyType()); bs_CurrencyType.DataSource = _currencyTypes; } } }
public static CurrencyType GetInstanceByName(string name) { return(CurrencyTypeList.FirstOrDefault(x => x.Text == name) ?? null); }
public static CurrencyType GetInstance(int value) { return(CurrencyTypeList.FirstOrDefault(x => x.Value == value) ?? null); }