/// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into StandardOperateProcedure(");
            strSql.Append("SOPID,SOPName,SOPWaitTimeLength,DesControllerInfoInLANID,Action,OutPutLength)");
            strSql.Append(" values (");
            strSql.Append("@SOPID,@SOPName,@SOPWaitTimeLength,@DesControllerInfoInLANID,@Action,@OutPutLength)");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@SOPID",                    DbType.Int32,   4),
                new SQLiteParameter("@SOPName",                  DbType.String),
                new SQLiteParameter("@SOPWaitTimeLength",        DbType.Int32,   4),
                new SQLiteParameter("@DesControllerInfoInLANID", DbType.Int32,   4),
                new SQLiteParameter("@Action",                   DbType.String),
                new SQLiteParameter("@OutPutLength",             DbType.Int32, 4)
            };
            parameters[0].Value = model.SOPID;
            parameters[1].Value = model.SOPName;
            parameters[2].Value = model.SOPWaitTimeLength;
            parameters[3].Value = model.DesControllerInfoInLANID;
            parameters[4].Value = model.Action;
            parameters[5].Value = model.OutPutLength;

            int rows = DbHelperSQLite.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update StandardOperateProcedure set ");
            strSql.Append("SOPName=@SOPName,");
            strSql.Append("SOPWaitTimeLength=@SOPWaitTimeLength,");
            strSql.Append("DesControllerInfoInLANID=@DesControllerInfoInLANID,");
            strSql.Append("Action=@Action,");
            strSql.Append("OutPutLength=@OutPutLength");
            strSql.Append(" where SOPID=@SOPID ");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@SOPName",                  DbType.String),
                new SQLiteParameter("@SOPWaitTimeLength",        DbType.Int32,   4),
                new SQLiteParameter("@DesControllerInfoInLANID", DbType.Int32,   4),
                new SQLiteParameter("@Action",                   DbType.String),
                new SQLiteParameter("@OutPutLength",             DbType.Int32,   4),
                new SQLiteParameter("@SOPID",                    DbType.Int32, 4)
            };
            parameters[0].Value = model.SOPName;
            parameters[1].Value = model.SOPWaitTimeLength;
            parameters[2].Value = model.DesControllerInfoInLANID;
            parameters[3].Value = model.Action;
            parameters[4].Value = model.OutPutLength;
            parameters[5].Value = model.SOPID;

            int rows = DbHelperSQLite.ExecuteSql(strSql.ToString(), parameters);

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure DataRowToModel(DataRow row)
 {
     KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure model=new KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure();
     if (row != null)
     {
         if(row["SOPID"]!=null && row["SOPID"].ToString()!="")
         {
             model.SOPID=int.Parse(row["SOPID"].ToString());
         }
         if(row["SOPName"]!=null)
         {
             model.SOPName=row["SOPName"].ToString();
         }
         if(row["SOPWaitTimeLength"]!=null && row["SOPWaitTimeLength"].ToString()!="")
         {
             model.SOPWaitTimeLength=int.Parse(row["SOPWaitTimeLength"].ToString());
         }
         if(row["DesControllerInfoInLANID"]!=null && row["DesControllerInfoInLANID"].ToString()!="")
         {
             model.DesControllerInfoInLANID=int.Parse(row["DesControllerInfoInLANID"].ToString());
         }
         if(row["Action"]!=null)
         {
             model.Action=row["Action"].ToString();
         }
         if(row["OutPutLength"]!=null && row["OutPutLength"].ToString()!="")
         {
             model.OutPutLength=int.Parse(row["OutPutLength"].ToString());
         }
     }
     return model;
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure GetModel(int SOPID)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("select SOPID,SOPName,SOPWaitTimeLength,DesControllerInfoInLANID,Action,OutPutLength from StandardOperateProcedure ");
            strSql.Append(" where SOPID=@SOPID ");
            SQLiteParameter[] parameters = {
                    new SQLiteParameter("@SOPID", DbType.Int32,4)			};
            parameters[0].Value = SOPID;

            KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure model=new KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure();
            DataSet ds=DbHelperSQLite.Query(strSql.ToString(),parameters);
            if(ds.Tables[0].Rows.Count>0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure DataRowToModel(DataRow row)
 {
     KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure model = new KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure();
     if (row != null)
     {
         if (row["SOPID"] != null && row["SOPID"].ToString() != "")
         {
             model.SOPID = int.Parse(row["SOPID"].ToString());
         }
         if (row["SOPName"] != null)
         {
             model.SOPName = row["SOPName"].ToString();
         }
         if (row["SOPWaitTimeLength"] != null && row["SOPWaitTimeLength"].ToString() != "")
         {
             model.SOPWaitTimeLength = int.Parse(row["SOPWaitTimeLength"].ToString());
         }
         if (row["DesControllerInfoInLANID"] != null && row["DesControllerInfoInLANID"].ToString() != "")
         {
             model.DesControllerInfoInLANID = int.Parse(row["DesControllerInfoInLANID"].ToString());
         }
         if (row["Action"] != null)
         {
             model.Action = row["Action"].ToString();
         }
         if (row["OutPutLength"] != null && row["OutPutLength"].ToString() != "")
         {
             model.OutPutLength = int.Parse(row["OutPutLength"].ToString());
         }
     }
     return(model);
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure GetModel(int SOPID)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select SOPID,SOPName,SOPWaitTimeLength,DesControllerInfoInLANID,Action,OutPutLength from StandardOperateProcedure ");
            strSql.Append(" where SOPID=@SOPID ");
            SQLiteParameter[] parameters =
            {
                new SQLiteParameter("@SOPID", DbType.Int32, 4)
            };
            parameters[0].Value = SOPID;

            KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure model = new KryptonAccessController.SQLite.Model.InteractRelation.StandardOperateProcedure();
            DataSet ds = DbHelperSQLite.Query(strSql.ToString(), parameters);

            if (ds.Tables[0].Rows.Count > 0)
            {
                return(DataRowToModel(ds.Tables[0].Rows[0]));
            }
            else
            {
                return(null);
            }
        }