Ejemplo n.º 1
0
        /// <summary>
        /// 更新线路
        /// </summary>
        /// <param name="MapTime"></param>
        /// <param name="Program"></param>
        /// <param name="MapName"></param>
        /// <param name="TagStr"></param>
        /// <param name="SpeedStr"></param>
        /// <param name="StopStr"></param>
        /// <param name="TurnStr"></param>
        /// <param name="DireStr"></param>
        /// <param name="PbsStr"></param>
        /// <param name="HookStr"></param>
        /// <param name="AgvStr"></param>
        /// <param name="ProgramStr"></param>
        /// <param name="RouteTime"></param>
        public bool UpdateRoute(long MapTime, int Program, string MapName, string TagStr, string SpeedStr, string StopStr, string TurnStr, string DireStr, string PbsStr, string HookStr, string AgvStr, string ProgramStr)
        {
            string sql = string.Format("UPDATE agv.`route{0}` SET  `Name` = '{1}', `Tag` = '{2}', `Speed` = '{3}', `Stop` = '{4}', `Turn` = '{5}', `Direction` = '{6}', Pbs = '{7}', Hook = '{8}', `AGV` = '{9}', `ChangeProgram` = '{10}'  WHERE Program = {11}", MapTime, MapName, TagStr, SpeedStr, StopStr, TurnStr, DireStr, PbsStr, HookStr, AgvStr, ProgramStr, Program);

            return(MySqlHelper.ExecuteNonQuery(sql) > 0 ? true : false);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 插入线路
        /// </summary>
        /// <param name="Program"></param>
        /// <param name="RouteName"></param>
        /// <param name="CreateTime"></param>
        /// <param name="MapTime"></param>
        /// <param name="Tag"></param>
        /// <param name="Speed"></param>
        /// <param name="Stop"></param>
        /// <param name="Turn"></param>
        /// <param name="Dire"></param>
        /// <param name="Pbs"></param>
        /// <param name="Hook"></param>
        /// <param name="Agv"></param>
        /// <param name="ChangeProgram"></param>
        /// <returns></returns>
        public bool InsertRoute(string Program, string RouteName, long CreateTime, long MapTime, string Tag, string Speed, string Stop, string Turn, string Dire, string Pbs, string Hook, string Agv, string ChangeProgram)
        {
            string sql = string.Format("INSERT INTO agv.`route{0}` (`Program`, `Name`, `CreateTime`, `Tag`, `Speed`, `Stop`, `Turn`, `Direction`, `Pbs`, `Hook`, `ChangeProgram`, `AGV`)  VALUES ('{1}', '{2}', {3}, '{4}', '{5}', '{6}', '{7}', '{8}', '{9}', '{10}', '{11}', '{12}') ", MapTime, Program, RouteName, CreateTime, Tag, Speed, Stop, Turn, Dire, Pbs, Hook, ChangeProgram, Agv);

            return(MySqlHelper.ExecuteNonQuery(sql) > 0 ? true : false);
        }