/// <summary> /// 得到一个对象实体 /// </summary> public TF.RunSafty.Model.TrainJiaoLu DataRowToModel(DataRow row) { TF.RunSafty.Model.TrainJiaoLu model = new TF.RunSafty.Model.TrainJiaoLu(); if (row != null) { if (row["bIsBeginWorkFP"] != null) { model.bIsBeginWorkFP = row["bIsBeginWorkFP"].ToString(); } if (row["bIsDir"] != null) { model.bIsDir = row["bIsDir"].ToString(); } if (row["nWorkTimeTypeID"] != null) { model.nWorkTimeTypeID = row["nWorkTimeTypeID"].ToString(); } if (row["strEndStation"] != null) { model.strEndStation = row["strEndStation"].ToString(); } if (row["strStartStation"] != null) { model.strStartStation = row["strStartStation"].ToString(); } if (row["strTrainJiaoluGUID"] != null) { model.strTrainJiaoluGUID = row["strTrainJiaoluGUID"].ToString(); } if (row["strTrainJiaoluName"] != null) { model.strTrainJiaoluName = row["strTrainJiaoluName"].ToString(); } if (row["strWorkShopGUID"] != null) { model.strWorkShopGUID = row["strWorkShopGUID"].ToString(); } } return(model); }
public List <TF.RunSafty.Model.TrainJiaoLu> GetPlaceList(List <TF.RunSafty.Model.TrainJiaoLu> placeList) { if (placeList != null) { List <TF.RunSafty.Model.TrainJiaoLu> resultList = new List <TF.RunSafty.Model.TrainJiaoLu>(); foreach (TF.RunSafty.Model.TrainJiaoLu place in placeList) { TF.RunSafty.Model.TrainJiaoLu model = new TF.RunSafty.Model.TrainJiaoLu(); model.bIsBeginWorkFP = place.bIsBeginWorkFP; model.bIsDir = place.bIsDir; model.nWorkTimeTypeID = place.nWorkTimeTypeID; model.strEndStation = place.strEndStation; model.strStartStation = place.strStartStation; model.strTrainJiaoluGUID = place.strTrainJiaoluGUID; model.strTrainJiaoluName = place.strTrainJiaoluName; model.strWorkShopGUID = place.strWorkShopGUID; resultList.Add(model); } return(resultList); } return(null); }