//前台js 部门
<script type="text/javascript">
$(function () {
var type=<%=GetBtnType()%>;
if(type==false)
{
$("#btnAddApprove").hide();// btnAddApprove需要显示与否的按钮
}
});
//后台
public string GetBtnType()
{
string type = "";
Model.UserInfo u=(Model.UserInfo) Session["userid"];
if(u.UserType==1)
{
type = "false";
}else if(u.UserType==0)
{
type = "true";
}
return type;
}