Пример #1
0
        public List <Model_Plan_ToBeTake> GetPlaceList(List <Model_Plan_ToBeTake> placeList)
        {
            if (placeList != null)
            {
                List <Model_Plan_ToBeTake> resultList = new List <Model_Plan_ToBeTake>();
                foreach (Model_Plan_ToBeTake place in placeList)
                {
                    Model_Plan_ToBeTake model = new Model_Plan_ToBeTake();
                    model.strCheCi       = place.strCheCi;
                    model.dtCallWorkTime = place.dtCallWorkTime;
                    model.dtWaitWorkTime = place.dtWaitWorkTime;

                    model.strTrainmanGUID1 = place.strTrainmanGUID1;
                    model.strTrainmanGUID2 = place.strTrainmanGUID2;
                    model.strTrainmanGUID3 = place.strTrainmanGUID3;
                    model.strTrainmanGUID4 = place.strTrainmanGUID4;

                    model.NNeedRest   = place.NNeedRest;
                    model.NPlanState  = place.NPlanState;
                    model.StrTrainNo  = place.StrTrainNo;
                    model.strPlanGUID = place.strPlanGUID;

                    resultList.Add(model);
                }
                return(resultList);
            }
            return(null);
        }
Пример #2
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Model_Plan_ToBeTake DataRowToModelBeginWork(DataRow row)
        {
            Model_Plan_ToBeTake model = new Model_Plan_ToBeTake();

            if (row != null)
            {
                if (row["dtArriveTime"] != null && row["dtArriveTime"].ToString() != "")
                {
                    model.dtWaitWorkTime = row["dtArriveTime"].ToString();
                }
                else
                {
                    model.dtWaitWorkTime = "";
                }


                if (row["dtCallTime"] != null && row["dtCallTime"].ToString() != "")
                {
                    model.dtCallWorkTime = row["dtCallTime"].ToString();
                }
                else
                {
                    model.dtCallWorkTime = "";
                }



                if (row["strGUID"] != null && row["strGUID"].ToString() != "")
                {
                    model.strPlanGUID = row["strGUID"].ToString();
                }
                else
                {
                    model.strPlanGUID = "";
                }

                if (row["strTrainNo"] != null)
                {
                    model.StrTrainNo = row["strTrainNo"].ToString();
                }
                else
                {
                    model.StrTrainNo = "";
                }


                if (row["strTrainNo"] != null)
                {
                    model.strCheCi = row["strTrainNo"].ToString();
                }
                else
                {
                    model.strCheCi = "";
                }


                if (row["strTrainmanGUID1"] != null)
                {
                    model.strTrainmanGUID1 = row["strTrainmanGUID1"].ToString();
                }
                else
                {
                    model.strTrainmanGUID1 = "";
                }
                if (row["strTrainmanGUID2"] != null)
                {
                    model.strTrainmanGUID2 = row["strTrainmanGUID2"].ToString();
                }
                else
                {
                    model.strTrainmanGUID2 = "";
                }
                if (row["strTrainmanGUID3"] != null)
                {
                    model.strTrainmanGUID3 = row["strTrainmanGUID3"].ToString();
                }
                else
                {
                    model.strTrainmanGUID3 = "";
                }
                if (row["strTrainmanGUID4"] != null)
                {
                    model.strTrainmanGUID4 = row["strTrainmanGUID4"].ToString();
                }
                else
                {
                    model.strTrainmanGUID4 = "";
                }
                if (row["nNeedRest"] != null && row["nNeedRest"].ToString() != "")
                {
                    model.NNeedRest = row["nNeedRest"].ToString();
                }
                else
                {
                    model.NNeedRest = "0";
                }
                if (row["ePlanState"] != null && row["ePlanState"].ToString() != "")
                {
                    model.NPlanState = row["ePlanState"].ToString();
                }
                else
                {
                    model.NPlanState = "0";
                }



                if (row["strTrainmanNumber1"] != null)
                {
                    model.strTrainmanNumber1 = row["strTrainmanNumber1"].ToString();
                }
                if (row["strTrainmanNumber2"] != null)
                {
                    model.strTrainmanNumber2 = row["strTrainmanNumber2"].ToString();
                }
                if (row["strTrainmanNumber3"] != null)
                {
                    model.strTrainmanNumber3 = row["strTrainmanNumber3"].ToString();
                }
                if (row["strTrainmanNumber4"] != null)
                {
                    model.strTrainmanNumber4 = row["strTrainmanNumber4"].ToString();
                }


                if (row["strTrainmanName1"] != null)
                {
                    model.strTrainmanName1 = row["strTrainmanName1"].ToString();
                }
                if (row["strTrainmanName2"] != null)
                {
                    model.strTrainmanName2 = row["strTrainmanName2"].ToString();
                }
                if (row["strTrainmanName3"] != null)
                {
                    model.strTrainmanName3 = row["strTrainmanName3"].ToString();
                }
                if (row["strTrainmanName4"] != null)
                {
                    model.strTrainmanName4 = row["strTrainmanName4"].ToString();
                }
            }
            return(model);
        }