public IEnumerable<Location> GetAll(long id) { DAL dal = new DAL(); SqlCommand cmd = new SqlCommand(); cmd.CommandText = "GetLocationGongTo"; cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@location_leaving_from", id); DataTable dt = dal.Execute(cmd); List<Location> locations = new List<Location>(); foreach (DataRow dr in dt.Rows) { Location location = new Location { location_id = Int64.Parse(dr["location_id"].ToString()), location_name = dr["location_name"].ToString(), active = bool.Parse(dr["active"].ToString()), date_created = DateTime.Parse(dr["date_created"].ToString()), created_by = dr["created_by"].ToString(), date_updated = DateTime.Parse(dr["date_updated"].ToString()), updated_by = dr["updated_by"].ToString(), }; locations.Add(location); } return locations; }
public bool Update(Location item) { throw new NotImplementedException(); }
public Location Add(Location item) { throw new NotImplementedException(); }