/// <summary>
        /// 增加一条数据
        /// </summary>
        public static bool Add(EtNet_Models.AnnouncementStatus model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("insert into AnnouncementStatus(");
            strSql.Append("txt");
            strSql.Append(") values (");
            strSql.Append("@txt");
            strSql.Append(") ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@txt", SqlDbType.VarChar, 10)
            };

            parameters[0].Value = model.txt;

            int result = EtNet_DAL.DBHelper.ExecuteCommand(strSql.ToString(), parameters);

            if (result >= 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 更新一条数据
        /// </summary>
        public static bool Update(EtNet_Models.AnnouncementStatus model)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("update AnnouncementStatus set ");
            strSql.Append(" txt = @txt  ");
            strSql.Append(" where id=@id ");

            SqlParameter[] parameters =
            {
                new SqlParameter("@id",  SqlDbType.Int,     4),
                new SqlParameter("@txt", SqlDbType.VarChar, 10)
            };
            parameters[0].Value = model.id;
            parameters[1].Value = model.txt;
            int result = EtNet_DAL.DBHelper.ExecuteCommand(strSql.ToString(), parameters);

            if (result >= 1)
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public static EtNet_Models.AnnouncementStatus GetModel(int id)
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * ");
            strSql.Append("  from AnnouncementStatus ");
            strSql.Append(" where id=@id");
            SqlParameter[] parameters =
            {
                new SqlParameter("@id", SqlDbType.Int, 4)
            };
            parameters[0].Value = id;

            EtNet_Models.AnnouncementStatus model = new EtNet_Models.AnnouncementStatus();
            DataTable tbl = EtNet_DAL.DBHelper.GetDataSet(strSql.ToString(), parameters);

            if (tbl.Rows.Count > 0)
            {
                model.id  = int.Parse(tbl.Rows[0]["id"].ToString());
                model.txt = tbl.Rows[0]["txt"].ToString();
                return(model);
            }
            else
            {
                return(null);
            }
        }
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public static bool Update(EtNet_Models.AnnouncementStatus model)
 {
     return(EtNet_DAL.AnnouncementStatusService.Update(model));
 }
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public static bool  Add(EtNet_Models.AnnouncementStatus model)
 {
     return(EtNet_DAL.AnnouncementStatusService.Add(model));
 }