赖素文
authored
|
1
2
3
4
5
6
7
8
9
|
using System.Globalization;
namespace Hh.Mes.T4
{
public partial class ControllerTemplate
{
private readonly string Area;
private readonly string TableName;
private readonly string TitleName;
|
唐召明
authored
|
10
11
|
private readonly string TableDescription;
private readonly bool IsDetail;
|
赖素文
authored
|
12
|
|
唐召明
authored
|
13
|
public ControllerTemplate(string area, string tableName, string description)
|
赖素文
authored
|
14
15
16
17
18
|
{
Area = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(area);
TableName = tableName;
var str = CultureInfo.CurrentCulture.TextInfo.ToTitleCase(tableName);
TitleName = string.Join("", str.Split('_'));
|
唐召明
authored
|
19
20
|
TableDescription = description;
IsDetail = tableName.EndsWith("detail", System.StringComparison.OrdinalIgnoreCase);
|
赖素文
authored
|
21
22
23
|
}
}
}
|