62,046
社区成员
发帖
与我相关
我的任务
分享
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)
return false;
else
return true;
}
return false;
}
string.isNullOrEmpty(cookie.Values["enterpriseID"])
if(cookie.Values["enterpriseID"]!=null){
if(cookie.Values["enterpriseID"]!=""){
int intmy = IsNumeric(cookie.Values["enterpriseID"]);
if (intmy > 0)
return false;
else
return true;
}
}