public TrainJiaolu_Out GetPlaceOfTrainJiaolu(string data) { TrainJiaolu_Out json = new TrainJiaolu_Out(); try { TrainJiaolu_In input = Newtonsoft.Json.JsonConvert.DeserializeObject <TrainJiaolu_In>(data); TF.RunSafty.BLL.Place.VIEW_Base_TrainJiaolu_DutyPlace bllPlace = new TF.RunSafty.BLL.Place.VIEW_Base_TrainJiaolu_DutyPlace(); List <TF.RunSafty.Model.VIEW_Base_TrainJiaolu_DutyPlace> placeList = bllPlace.GetPlaceOfTrainJiaolu(input.trainjiaoluID); json.result = "0"; json.resultStr = "提交成功"; json.data = GetPlaceList(placeList); } catch (Exception ex) { TF.CommonUtility.LogClass.logex(ex, ""); json.result = "1"; json.resultStr = "提交失败" + ex.Message; } return(json); }
public TrainJiaolu_Out GetPlaceOfTrainJiaoluV2(TrainJiaolu_In input) { TrainJiaolu_Out json = new TrainJiaolu_Out(); try { TF.RunSafty.BLL.Place.VIEW_Base_TrainJiaolu_DutyPlace bllPlace = new TF.RunSafty.BLL.Place.VIEW_Base_TrainJiaolu_DutyPlace(); List <TF.RunSafty.Model.VIEW_Base_TrainJiaolu_DutyPlace> placeList = bllPlace.GetPlaceOfTrainJiaolu(input.trainjiaoluID); json.result = "0"; json.resultStr = "提交成功"; json.data = GetPlaceList(placeList); } catch (Exception ex) { TF.CommonUtility.LogClass.log(ex.Message.ToString()); TF.CommonUtility.LogClass.logex(ex, ""); json.result = "1"; json.resultStr = "提交失败" + ex.Message; } return(json); }
public TrainJiaolu_Out GetTrainJiaolu(string input) { TrainJiaolu_Out json = new TrainJiaolu_Out(); TrainJiaolu_In model = null; RRsTrainJiaolu jiaolu = null; try { model = JsonConvert.DeserializeObject <TrainJiaolu_In>(input); string strSql = "select * from VIEW_Base_TrainJiaolu where strTrainJiaoluGUID=@strTrainJiaoluGUID "; SqlParameter[] sqlParameters = new SqlParameter[] { new SqlParameter("strTrainJiaoluGUID", model.strTrainJiaoluGUID), }; DataTable table = SqlHelper.ExecuteDataset(SqlHelper.ConnString, CommandType.Text, strSql, sqlParameters).Tables[0]; json.data = new List <RRsTrainJiaolu>(); foreach (DataRow dataRow in table.Rows) { jiaolu = new RRsTrainJiaolu(); jiaolu.strEndStation = dataRow["strEndStation"].ToString(); jiaolu.strEndStationName = dataRow["strEndStationName"].ToString(); jiaolu.strStartStation = dataRow["strStartStation"].ToString(); jiaolu.strStartStationName = dataRow["strStartStationName"].ToString(); jiaolu.strTrainJiaoluGUID = dataRow["strTrainJiaoluGUID"].ToString(); jiaolu.strTrainJiaoluName = dataRow["strTrainJiaoluName"].ToString(); jiaolu.strWorkShopGUID = dataRow["strWorkShopGUID"].ToString(); jiaolu.bIsBeginWorkFP = Convert.ToInt32(dataRow["bIsBeginWorkFP"].ToString()); json.data.Add(jiaolu); } json.result = "0"; json.resultStr = "获取交路成功"; } catch (Exception ex) { LogClass.logex(ex, ""); throw ex; } return(json); }