Exemplo n.º 1
0
        public bool UpdateByParamModel(TF.RunSafty.Model.InterfaceModel.PlanRestModel paramModel, string IsOrNotIndexes)
        {
            TF.RunSafty.Model.TAB_Plan_Rest Plan_Rest = this.GetModel(paramModel.data.strguid);
            SetModelValue(paramModel, Plan_Rest);

            if (IsOrNotIndexes == "")
            {
                return(this.Update(Plan_Rest));
            }
            else
            {
                return(this.UpdateAndFirst(Plan_Rest, Plan_Rest.strTrainJiaoLuGUID));
            }
        }
Exemplo n.º 2
0
        public void SetModelValue(TF.RunSafty.Model.InterfaceModel.PlanRestModel PlanRestModel, TF.RunSafty.Model.TAB_Plan_Rest Plan_Rest)
        {
            string dt = DateTime.Now.ToString();

            if (PlanRestModel.data.dtarrivetime.ToString() != "")
            {
                Plan_Rest.dtArriveTime = PlanRestModel.data.dtarrivetime.ToString();
            }
            else
            {
                Plan_Rest.dtArriveTime = dt;
            }
            if (PlanRestModel.data.dtcalltime.ToString() != "")
            {
                Plan_Rest.dtCallTime = PlanRestModel.data.dtcalltime.ToString();
            }
            else
            {
                Plan_Rest.dtCallTime = dt;
            }

            if (PlanRestModel.data.dtchuqintime.ToString() != "")
            {
                Plan_Rest.dtChuQinTime = PlanRestModel.data.dtchuqintime.ToString();
            }
            else
            {
                Plan_Rest.dtChuQinTime = dt;
            }

            if (PlanRestModel.data.dtStartTrainTime.ToString() != "")
            {
                Plan_Rest.dtStartTrainTime = PlanRestModel.data.dtStartTrainTime.ToString();
            }
            else
            {
                Plan_Rest.dtStartTrainTime = dt;
            }

            if (PlanRestModel.data.dtSignTime.ToString() != "")
            {
                Plan_Rest.dtSignTime = PlanRestModel.data.dtSignTime.ToString();
            }
            else
            {
                Plan_Rest.dtSignTime = dt;
            }



            Plan_Rest.strGUID            = PlanRestModel.data.strguid;
            Plan_Rest.strTrainJiaoLuGUID = PlanRestModel.data.strtrainjiaoluguid;
            Plan_Rest.strTrainmanGUID1   = PlanRestModel.data.strtrainmanguid1;
            Plan_Rest.strTrainmanGUID2   = PlanRestModel.data.strtrainmanguid2;
            Plan_Rest.strTrainmanGUID3   = PlanRestModel.data.strtrainmanguid3;
            Plan_Rest.strTrainmanGUID4   = PlanRestModel.data.strtrainmanguid4;
            Plan_Rest.strTrainNo         = PlanRestModel.data.strtrainno;
            Plan_Rest.strTrainNoGUID     = PlanRestModel.data.strtrainnoguid;
            Plan_Rest.strWorkGrouGUID    = PlanRestModel.data.strworkgrouguid;
            Plan_Rest.nNeedRest          = PlanRestModel.data.nNeedRest;
            Plan_Rest.nFinished          = PlanRestModel.data.nFinished;;
            if (PlanRestModel.data.ePlanState != "")
            {
                Plan_Rest.ePlanState = int.Parse(PlanRestModel.data.ePlanState);
            }
            else
            {
                Plan_Rest.ePlanState = 0;
            }
        }