/// <summary>
 /// 得到一个对象实体
 /// </summary>
 public SmartLaw.Model.NoticeRegionalRelation DataRowToModel(DataRow row)
 {
     SmartLaw.Model.NoticeRegionalRelation model = new SmartLaw.Model.NoticeRegionalRelation();
     if (row != null)
     {
         if(row["AutoID"]!=null && row["AutoID"].ToString()!="")
         {
             model.AutoID=long.Parse(row["AutoID"].ToString());
         }
         if (row["NoticeID"] != null && row["NoticeID"].ToString() != "")
         {
             model.NoticeID = long.Parse(row["NoticeID"].ToString());
         }
         if(row["RegionalID"]!=null)
         {
             model.RegionalID=row["RegionalID"].ToString();
         }
     }
     return model;
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public SmartLaw.Model.NoticeRegionalRelation GetModel(long AutoID)
        {
            StringBuilder strSql=new StringBuilder();
            strSql.Append("select AutoID,NoticeID,RegionalID from NoticeRegionalRelation");
            strSql.Append(" where AutoID=@AutoID limit 1");
            MySqlParameter[] parameters = {
                    new MySqlParameter("@AutoID", MySqlDbType.Int64)			};
            parameters[0].Value = AutoID;

            SmartLaw.Model.NoticeRegionalRelation model = new SmartLaw.Model.NoticeRegionalRelation();
            DataSet ds=DbHelperMySQL.Query(strSql.ToString(),parameters);
            if(ds.Tables[0].Rows.Count>0)
            {
                return DataRowToModel(ds.Tables[0].Rows[0]);
            }
            else
            {
                return null;
            }
        }