Beispiel #1
0
 /// <summary>
 /// 修改操作
 /// </summary>
 /// <param name="TM">实体类</param>
 /// <returns>影响行数</returns>
 public int Update(T TM)
 {
     return(SqlHelper.ExecuteSql(
                UpdateTxt,
                ParameterHelp.ParmsByModule(TM, propArray)
                ));
 }
Beispiel #2
0
        /// <summary>
        /// 添加并返回标志ID
        /// </summary>
        /// <param name="model">要添加的数据模型</param>
        /// <returns></returns>
        public int AddWithIdentity(T model)
        {
            object id = SqlHelper.ExecuteScalarText(AddTxt + " SELECT @@identity", ParameterHelp.ParmsByModule(model, propArray));

            return(Convert.ToInt32(id));
        }