public static FundInfo GetFundById(int fundId) { int retValue = -1; FundInfo fund = new FundInfo(); //Generated Code for query : dbo.GetAllVendors using (SqlDataReader dr = ProjManagementAdmin.GetFundById(fundId, out retValue)) //Initialize and retrieve code for Datareader goes here { while (dr.Read()) { 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(); } //dr.Close(); } return(fund); }