Example #1
0
        /// <summary>
        /// 删除项目
        /// </summary>
        /// <param name="id"></param>
        /// <param name="userid"></param>
        /// <returns></returns>
        public int DelteProject(string id, string userid)
        {
            string sql = "delete from Construction where ConstructionId=@id and SupportingId=@userid";

            SqlParameter[] arr = new SqlParameter[] {
                new SqlParameter("@id", id),
                new SqlParameter("@userid", userid)
            };

            return(SqlHelperMeasure.ExecuteNonQuery(sql, arr));
        }
Example #2
0
        /// <summary>
        /// 保存项目
        /// </summary>
        /// <param name="CustomerName"></param>
        /// <param name="phone"></param>
        /// <param name="address"></param>
        /// <param name="demanddesc"></param>
        /// <param name="id"></param>
        /// <returns></returns>
        public string SaveItem(string CustomerName, string phone, string address, string demanddesc, string id)
        {
            #region MyRegion
            string sql = "update Construction set ConstructionLxr=@CustomerName ,Phone=@phone,Start_qht=@address,Start=@demanddesc where ConstructionId=@id";
            #endregion


            SqlParameter[] arr = new SqlParameter[] {
                new SqlParameter("@CustomerName", CustomerName),
                new SqlParameter("@phone", phone),
                new SqlParameter("@address", address),
                new SqlParameter("@demanddesc", demanddesc),
                new SqlParameter("@id", id)
            };

            return(SqlHelperMeasure.ExecuteNonQuery(sql, arr).ToSafeString());
        }