public int Add(InvestmentGroup aType) { int returnValue = -1; returnValue = new InvestmentGroupDataHelper().Insert(aType); DataInserted(this, new EventArgs()); return(returnValue); }
public BindingList <InvestmentGroup> Show(InvestmentGroup aType) { try { var myList = new InvestmentGroupDataHelper().SelectAll(); var bindingList = new BindingList <InvestmentGroup>(myList); return(bindingList); } catch (ArgumentNullException) { throw new DataExistence("No Data Found! No Investment group is yet created."); } }
public BindingSource GetList() { InvestmentGroupDataHelper DH = new InvestmentGroupDataHelper(); BindingSource BS = new BindingSource(); Hashtable HT = new Hashtable(); List <InvestmentGroup> myList = DH.SelectAll(); if (myList != null) { foreach (var item in myList) { if (item.State == EntityState.Enabled) { HT.Add(item.ID, item.Name); } } } HT.Add(-1, "Select Investment Group"); BS.DataSource = HT; return(BS); }
public InvestmentGroup Show(int SearchbyID) { var mySingleItem = new InvestmentGroupDataHelper().SelectByID(SearchbyID); return(mySingleItem); }