Beispiel #1
0
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="p"></param>
        public void DelMemos(int p)
        {
            string sql = "delete Memos where ID=@id";

            SqlParameter[] para =
            {
                new SqlParameter("@id", p)
            };
            DbHelper.ExecuteCommandBySql(sql, para);
        }
Beispiel #2
0
        /// <summary>
        /// 设置为已读
        /// </summary>
        /// <param name="id"></param>
        public void UpdateMemosIsRead(int id)
        {
            string sql = "update Memos set IsRead=1 where id=@id";

            SqlParameter[] para =
            {
                new SqlParameter("@id", id)
            };
            DbHelper.ExecuteCommandBySql(sql, para);
        }
        public bool DelNsyNews(int p)
        {
            string sql = "delete NsyNews where ID=@id";

            SqlParameter[] para =
            {
                new SqlParameter("@id", p)
            };
            if (DbHelper.ExecuteCommandBySql(sql, para) > 0)
            {
                return(true);
            }
            return(false);
        }
Beispiel #4
0
        /// <summary>
        /// 添加一个分类
        /// </summary>
        /// <param name="tpName"></param>
        /// <returns></returns>
        public bool AddCaseType(string tpName)
        {
            string sql = "insert into BoCaseType (TypeName) values(@TypeName)";

            SqlParameter[] para =
            {
                new SqlParameter("@TypeName", tpName)
            };
            if (DbHelper.ExecuteCommandBySql(sql, para) > 0)
            {
                return(true);
            }
            return(false);
        }
        /// <summary>
        /// 删除案例
        /// </summary>
        /// <returns></returns>
        public bool DelBoutiqueCase(int d)
        {
            string sql = "delete BoutiqueCase where ID=@id";

            SqlParameter[] para =
            {
                new SqlParameter("@id", d)
            };
            if (DbHelper.ExecuteCommandBySql(sql, para) > 0)
            {
                return(true);
            }
            return(false);
        }
Beispiel #6
0
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="us"></param>
        /// <returns></returns>
        public bool EditPwd(UserInfo us)
        {
            string sql = "update UserInfo set LogPwd=@pwd where ID=@id";

            SqlParameter[] para =
            {
                new SqlParameter("@pwd", us.LogPwd),
                new SqlParameter("@id",  us.ID),
            };
            if (DbHelper.ExecuteCommandBySql(sql, para) > 0)
            {
                return(true);
            }
            return(false);
        }