enum enmFuncSets
{
fsNotFunc,
fsReadOnly
//...
}
private void button1_Click(object sender, EventArgs e)
{
string Per = cp.GetPowerModelName(LoginID, ModelName);
enmFuncSets func = (enmFuncSets)Enum.Parse(typeof(enmFuncSets), Per);
switch (func)
{
case enmFuncSets.fsNotFunc:
ClientScript.RegisterStartupScript(this.GetType(), "GetPow", " window.parent.main.location = 'VoidPower.aspx';", true);
break;
case enmFuncSets.fsReadOnly:
Gv.Columns[ColIndex].Visible = false;
break;
default:
ClientScript.RegisterStartupScript(this.GetType(), "GetPow", " window.parent.main.location = 'VoidPower.aspx';", true);
break;
}
}