public List<AssetCardDTO> GetAssetTagNo() { DataSet dsUserFav = new DataSet(); AssetCardDTO objAssetCardDto; List<AssetCardDTO> objAssetCardDtoList = new List<AssetCardDTO>(); try { Database db = DatabaseFactory.CreateDatabase("testConnectionString5"); DbCommand myCommand = db.GetStoredProcCommand("usp_getAssetTagNo"); dsUserFav = db.ExecuteDataSet(myCommand); foreach (DataRow dr in dsUserFav.Tables[0].Rows) { objAssetCardDto = new AssetCardDTO(); objAssetCardDto.TextFeild = dr["Textfield"].ToString(); objAssetCardDto.ValueFeild = dr["Valuefield"].ToString(); objAssetCardDtoList.Add(objAssetCardDto); } return objAssetCardDtoList; } catch (Exception ex) { string message = ex.Message.ToString(); return null; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)