这是我的数据表
public static DataTable GetTableForApproval()
{
using (var connection = Utils.Database.GetConnection())
using (var command = new SqlCommand("SELECT [UserID], [Username], " +
"[Email], [Role], [Date] FROM [Users] WHERE [Role] = @role",
connection))
{
command.Parameters.AddWithValue("@role", "Waiting");
using (var reader = command.ExecuteReader())
{
var table = new DataTable();
table.Columns.Add("UserID", typeof(int));
table.Columns.Add("Name", typeof(string));
table.Columns.Add("Email", typeof(string));
table.Columns.Add("Role", typeof(string));
table.Columns.Add("Registration date", typeof(DateTime));
if (reader != null)
{
while (reader.Read())
{
table.Rows.Add((int)reader["UserID"],
(string)reader["Username"], (string)reader["Email"],
(string)reader["Role"], (DateTime)reader["Date"]);
}
}
return table;
}
}
}
我希望能本地化列名,你能告诉我如何实现吗?我的.aspx页面已经本地化了,但是我不知道如何本地化.cs文件中的文本。