/// <summary>
        /// 将数据持久到数据库
        /// </summary>
        public void Persistent()
        {
            string sql = "INSERT INTO T_PROCESS(NID,ORIGIN,DESTINATION,TRANSITIONID,INSTANCEID,NODETYPE,RNID,OPERATION) VALUES(@NID,@ORIGIN,@DESTINATION,@TRANSITIONID,@INSTANCEID,@NODETYPE,@RNID,@OPERATION)";

            Connection.Execute(sql, new
            {
                NID          = Guid.NewGuid().ToString(),
                ORIGIN       = ORIGIN,
                DESTINATION  = DESTINATION,
                TRANSITIONID = TRANSITIONID,
                INSTANCEID   = INSTANCEID,
                NODETYPE     = NODETYPE.ToString(),
                RNID         = RNID,
                OPERATION    = OPERATION
            });
        }
Example #2
0
 public override string ToString()
 {
     return(string.Format("Name:{0} Type:{1} Weight:{2}", Name, Type.ToString(), Weight));
 }
Example #3
0
 public override string ToString()
 {
     return("id: " + id + "  type: " + nodeType.ToString() + "   layer: " + layer + "    bias: " + bias);
 }