/// <summary>
        /// 更新一条数据
        /// </summary>
        public bool Update(Maticsoft.Model.T_WarningNotice model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update T_WarningNotice set ");
            strSql.Append("PointID=@PointID,");
            strSql.Append("Telephone=@Telephone,");
            strSql.Append("Mail=@Mail");
            strSql.Append(" where Id=@Id ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@PointID",   SqlDbType.Int,       4),
                new SqlParameter("@Telephone", SqlDbType.NVarChar, 50),
                new SqlParameter("@Mail",      SqlDbType.NVarChar, -1),
                new SqlParameter("@Id",        SqlDbType.Int, 4)
            };
            parameters[0].Value = model.PointID;
            parameters[1].Value = model.Telephone;
            parameters[2].Value = model.Mail;
            parameters[3].Value = model.Id;

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

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 增加一条数据
        /// </summary>
        public bool Add(Maticsoft.Model.T_WarningNotice model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into T_WarningNotice(");
            strSql.Append("Id,PointID,Telephone,Mail)");
            strSql.Append(" values (");
            strSql.Append("@Id,@PointID,@Telephone,@Mail)");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id",        SqlDbType.Int,       4),
                new SqlParameter("@PointID",   SqlDbType.Int,       4),
                new SqlParameter("@Telephone", SqlDbType.NVarChar, 50),
                new SqlParameter("@Mail",      SqlDbType.NVarChar, -1)
            };
            parameters[0].Value = model.Id;
            parameters[1].Value = model.PointID;
            parameters[2].Value = model.Telephone;
            parameters[3].Value = model.Mail;

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

            if (rows > 0)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
 /// <summary>
 /// 得到一个对象实体
 /// </summary>
 public Maticsoft.Model.T_WarningNotice DataRowToModel(DataRow row)
 {
     Maticsoft.Model.T_WarningNotice model = new Maticsoft.Model.T_WarningNotice();
     if (row != null)
     {
         if (row["Id"] != null && row["Id"].ToString() != "")
         {
             model.Id = int.Parse(row["Id"].ToString());
         }
         if (row["PointID"] != null && row["PointID"].ToString() != "")
         {
             model.PointID = int.Parse(row["PointID"].ToString());
         }
         if (row["Telephone"] != null)
         {
             model.Telephone = row["Telephone"].ToString();
         }
         if (row["Mail"] != null)
         {
             model.Mail = row["Mail"].ToString();
         }
     }
     return(model);
 }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public Maticsoft.Model.T_WarningNotice GetModel(int Id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select  top 1 Id,PointID,Telephone,Mail from T_WarningNotice ");
            strSql.Append(" where Id=@Id ");
            SqlParameter[] parameters =
            {
                new SqlParameter("@Id", SqlDbType.Int, 4)
            };
            parameters[0].Value = Id;

            Maticsoft.Model.T_WarningNotice model = new Maticsoft.Model.T_WarningNotice();
            DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters);

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