Esempio n. 1
0
        public static FundInfo[] GetAllFunds()
        {
            ArrayList al = new ArrayList();

            int retValue = -1;


            //Generated Code for query : dbo.GetAllVendors
            using (SqlDataReader dr = ProjManagementAdmin.GetAllFunds(out retValue)) //Initialize and retrieve code for Datareader goes here
            {
                while (dr.Read())
                {
                    FundInfo fund = new FundInfo();
                    fund.FundId       = Convert.ToInt32(dr["fund_id"]);
                    fund.FundDesc     = dr["fund_desc"].ToString();
                    fund.FundAmount   = Convert.ToSingle(dr["fund_amount"]);
                    fund.ReceivedDate = Convert.ToDateTime(dr["received_date"]);
                    fund.ChangedDate  = Convert.ToDateTime(dr["changed_date"]);
                    fund.ChangedBy    = dr["changed_by"].ToString();

                    al.Add(fund);
                }
                //dr.Close();
            }

            FundInfo[] allInfo = new FundInfo[al.Count];
            al.CopyTo(allInfo);
            return(allInfo);
        }