Beispiel #1
0
        /// <summary>
        /// 添加项目信息
        /// </summary>
        /// <param name="name">项目名称</param>
        /// <param name="money">目标金额</param>
        /// <param name="count">支持人数</param>
        /// <param name="pros">人气</param>
        /// <param name="classid">类型</param>
        /// <returns></returns>
        public static bool AddProject(string name, decimal money, int count, int pros, int classid)
        {
            string sql = $"insert into project values('{name},'{money},{count},{pros},{classid})";

            return(DBH.ExecuteNonQuery(sql));
        }
Beispiel #2
0
        /// <summary>
        /// 删除项目信息
        /// </summary>
        /// <param name="id">项目ID</param>
        /// <returns></returns>
        public static bool DelProject(int id)
        {
            string sql = $"delete from project where projectID = {id}";

            return(DBH.ExecuteNonQuery(sql));
        }
Beispiel #3
0
        /// <summary>
        /// 查询所有项目信息
        /// </summary>
        /// <returns></returns>
        public static DataTable GetAllProjects()
        {
            string sql = "select * from project p,projectClass pc where p.classid=pc.classid";

            return(DBH.GetDataTable(sql));
        }