public void InsertLine(TestLoadDAO line) { CultureInfo culture = CultureInfo.CreateSpecificCulture("en-GB"); DateTime dt = Convert.ToDateTime(line.DeliverByDate, culture); dataManager.ExecuteNonQuery(_InsertLine, new object[] { line.LineId, line.OrderCount, line.ItemsPerOrder, line.ItemVolume, dt, line.CarrierServiceGroup, line.CountryCode }); }
public List <TestLoadDAO> GetLines() { List <TestLoadDAO> linelist = new List <TestLoadDAO>(); IDataReader dr = dataManager.ExecuteReader(_GetLines, new object[] { }); while (dr.Read()) { TestLoadDAO obj = new TestLoadDAO(); obj.LineId = Convert.ToDecimal(dr["line_id"].ToString()); obj.OrderCount = Convert.ToDecimal(dr["ordercount"].ToString()); obj.ItemsPerOrder = Convert.ToDecimal(dr["itemsperorder"].ToString()); obj.ItemVolume = Convert.ToDecimal(dr["item_volume"].ToString()); obj.DeliverByDate = dr["deliverby_dt"].ToString(); obj.CountryCode = dr["countrycode"].ToString(); obj.CarrierServiceGroup = dr["carrier_service_group"].ToString(); linelist.Add(obj); } return(linelist); }
public void DeleteLine(TestLoadDAO line) { dataManager.ExecuteNonQuery(_Deleteline, new object[] { line.LineId }); }