STNList = new List<STNforGCN>(); while (reader.Read()) { STNList.Add(LoadSTN(reader)); } this.Connection.Close(); private STNforGCN LoadSTN(IDataReader reader) { STNforGCN stn = new STNforGCN(); stn.STNID = Convert.ToInt32(reader["STNID"]); stn.STNNumber = reader["STNNumber"].ToString(); stn.GeneratedForEntityID = Convert.ToInt32(reader["GeneratedForEntityID"]); stn.Value = Math.Round(Convert.ToDecimal(reader["VALUE"]), 2); stn.BrandName = reader["BrandName"].ToString(); stn.StnStatus = reader["Status"].ToString(); return stn; }
STNforGCN stn=null; while (reader.Read()) { stn = new STNforGCN(); stn.STNID = Convert.ToInt32(reader["STNID"]); stn.STNNumber = reader["STNNumber"].ToString(); stn.GeneratedForEntityID = Convert.ToInt32(reader["GeneratedForEntityID"]); stn.Value = Math.Round(Convert.ToDecimal(reader["VALUE"]), 2); stn.BrandName = reader["BrandName"].ToString(); stn.StnStatus = reader["Status"].ToString(); STNList.Add(stn); } this.Connection.Close();
STNforGCN
LoadSTN
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)