DataSet result =
new
DataSet();
result =
new
Class1().hsggetdata(sql);
if
(result !=
null
)
{
if
(result.Tables[0].Rows.Count > 0)
{
Session[
"username"
] = TextBox1.Text.ToString().Trim();
if
(cx.Text.ToString().Trim() ==
"管理员"
)
{
Session[
"cx"
] = result.Tables[0].Rows[0][
"cx"
].ToString().Trim();
}
else
{
Session[
"cx"
] = cx.Text.ToString().Trim();
}
Response.Redirect(
"main.aspx"
);
}
else
{
Response.Write(
"<script>javascript:alert('对不起,用户名或密码不正确,或您的帐号未经审核!');</script>"
);
}
}
else
{
Response.Write(
"<script>javascript:alert('对不起,系统错误,请不要越权操作!');</script>"
);
}
}
protected
void
Button2_Click(
object
sender, EventArgs e)
{
Response.Redirect(
"yonghuzhuce_add.aspx"
);
}
}
}
else
{
Response.Write(
"<script>javascript:alert('对不起,用户名或密码不正确,或您的帐号未经审核!');</script>"
);
}
}
else
{
Response.Write(
"<script>javascript:alert('对不起,系统错误,请不要越权操作!');</script>"
);
}
}
protected
void
Button2_Click(
object
sender, EventArgs e)
{
Response.Redirect(
"yonghuzhuce_add.aspx"
);
}
}