About Enum
public enum ActiveType
{
New = 0,
AfterSales
代码
public ActiveType Type
{
get
{
return ViewState["type"] == null ? ActiveType.New : (ActiveType)Convert.ToInt32(ViewState["type"]);
}
set
{
ViewState["type"] = value;
if (value == ActiveType.New)
{
lbTitle.Text = "新车市场活动";
}
else
{
lbTitle.Text = "售后市场活动";
}
}
}
{
get
{
return ViewState["type"] == null ? ActiveType.New : (ActiveType)Convert.ToInt32(ViewState["type"]);
}
set
{
ViewState["type"] = value;
if (value == ActiveType.New)
{
lbTitle.Text = "新车市场活动";
}
else
{
lbTitle.Text = "售后市场活动";
}
}
}
}