日期:2014-05-17 浏览次数:20402 次
public static int EnterpriseID()
{
HttpContext context = HttpContext.Current ;
HttpCookie cookie=context.Request.Cookies["CookieLe"];
if(cookie.Values["enterpriseID"]==null||cookie.Values["enterpriseID"]=="")
{
//return 0;
}
else
{
return int.Parse(jiemi_Des(cookie.Values["enterpriseID"]));
}
if (context.Session["enterpriseID"] == null || context.Session["enterpriseID"].ToString() == "")
{
//return 0;
}
else
{
return int.Parse(context.Session["enterpriseID"].ToString());
}
return 0;
}
public static bool EnterpriseAuthenticated()
{
HttpContext context = HttpContext.Current ;
if (context.Session["enterpriseID"] == null || context.Session["enterpriseID"].ToString() == "")
{
//return(false);
}
else
{
return (true);
}
if (context.Request.Cookies["CookieLe"] == null)
return false;
HttpCookie cookie=context.Request.Cookies["CookieLe"];
//string name=cookie.Values["name"];
//string age=cookie.Values["age"];
if(cookie.Values["enterpriseID"]==null||cookie.Values["enterpriseID"]=="")
{
}
else
{
int intmy = IsNumeric(cookie.Values["enterpriseID"]);
if (intmy > 0)
&n