日期:2014-05-18  浏览次数:20489 次

大家帮帮忙看个很菜菜的提问!
C# code
 
#region 数据访问处理方法[自动生成].

/// <summary>
/// 将数据实体写入数据库.
/// </summary>
public bool Add(RM.Entity.Admin MyEntity)
{
StringBuilder strSql=new StringBuilder();
strSql.Append("INSERT INTO " + this.strTableName + "(");
strSql.Append("[AdminName],");
strSql.Append("[Password],");
strSql.Append("[Truename],");
strSql.Append("[Duty],");
strSql.Append("[Email],");
strSql.Append("[Address],");
strSql.Append("[Telephone],");
strSql.Append("[Sex],");
strSql.Append("[CreateTime],");
strSql.Append("[LoginCount],");
strSql.Append("[LoginIP],");
strSql.Append("[LastLogin],");
strSql.Append("[UserGroup]");
strSql.Append(")VALUES(");
strSql.Append("@AdminName,@Password,@Truename,@Duty,@Email,@Address,@Telephone,@Sex,@CreateTime,@LoginCount,@LoginIP,@LastLogin,@UserGroup)");
RM.DataProvider.SqlDBO.SqlCmdParam[] MyParam = {
MyDBO.CreateNewParam("@AdminName", SqlDbType.VarChar, MyEntity.AdminName),
MyDBO.CreateNewParam("@Password", SqlDbType.VarChar, MyEntity.Password),
MyDBO.CreateNewParam("@Truename", SqlDbType.VarChar, MyEntity.Truename),
MyDBO.CreateNewParam("@Duty", SqlDbType.VarChar, MyEntity.Duty),
MyDBO.CreateNewParam("@Email", SqlDbType.VarChar, MyEntity.Email),
MyDBO.CreateNewParam("@Address", SqlDbType.VarChar, MyEntity.Address),
MyDBO.CreateNewParam("@Telephone", SqlDbType.VarChar, MyEntity.Telephone),
MyDBO.CreateNewParam("@Sex", SqlDbType.VarChar, MyEntity.Sex),
MyDBO.CreateNewParam("@CreateTime", SqlDbType.SmallDateTime, MyEntity.CreateTime),
MyDBO.CreateNewParam("@LoginCount", SqlDbType.Int, MyEntity.LoginCount),
MyDBO.CreateNewParam("@LoginIP", SqlDbType.VarChar, MyEntity.LoginIP),
MyDBO.CreateNewParam("@LastLogin", SqlDbType.SmallDateTime, MyEntity.LastLogin),
MyDBO.CreateNewParam("@UserGroup", SqlDbType.VarChar, MyEntity.UserGroup)
};
bool result = false;
if(MyDBO.ExecuteNonQuery(strSql.ToString(), MyParam) > 0)
{
result = true;
}
return result;
}


我的问题是,他这里看注释应该是自动生成的,那么是怎么自动生成的呢?用其他软件还是.NET Framework自带的工具还是什么呢?

------解决方案--------------------
单击“工具”中的“生成注释Web页” 

------解决方案--------------------
你是指代码生成器吗?如果使用的话是可以生成!你可以网上搜下!
------解决方案--------------------
探讨
你是指代码生成器吗?如果使用的话是可以生成!你可以网上搜下!