/// <summary>
 /// 得到一个对象实体
 /// </summary>
 public SmartLaw.Model.MessageToObject DataRowToModel(DataRow row)
 {
     SmartLaw.Model.MessageToObject model = new SmartLaw.Model.MessageToObject();
     if (row != null)
     {
         if (row["AutoID"] != null && row["AutoID"].ToString() != "")
         {
             model.AutoID = long.Parse(row["AutoID"].ToString());
         }
         if (row["MsgID"] != null && row["MsgID"].ToString() != "")
         {
             model.MsgID = long.Parse(row["MsgID"].ToString());
         }
         if (row["ObjType"] != null)
         {
             model.ObjType = row["ObjType"].ToString();
         }
         if (row["ObjValue"] != null)
         {
             model.ObjValue = row["ObjValue"].ToString();
         }
     }
     return model;
 }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public SmartLaw.Model.MessageToObject GetModel(long AutoID)
 {
     StringBuilder strSql = new StringBuilder();
     strSql.Append("select AutoID,MsgID,ObjType,ObjValue from MessageToObject");
     strSql.Append(" where AutoID=@AutoID limit 1");
     MySqlParameter[] parameters = {
             new MySqlParameter("@AutoID", MySqlDbType.Int64)			};
     parameters[0].Value = AutoID;
     SmartLaw.Model.MessageToObject model = new SmartLaw.Model.MessageToObject();
     DataSet ds = DbHelperMySQL.Query(strSql.ToString(), parameters);
     if (ds.Tables[0].Rows.Count > 0)
     {
         return DataRowToModel(ds.Tables[0].Rows[0]);
     }
     else
     {
         return null;
     }
 }