Exemplo n.º 1
0
        public int Add(InvestmentGroup aType)
        {
            int returnValue = -1;

            returnValue = new InvestmentGroupDataHelper().Insert(aType);
            DataInserted(this, new EventArgs());

            return(returnValue);
        }
Exemplo n.º 2
0
 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.");
     }
 }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        public InvestmentGroup Show(int SearchbyID)
        {
            var mySingleItem = new InvestmentGroupDataHelper().SelectByID(SearchbyID);

            return(mySingleItem);
        }