5 Star 42 Fork 3

maxinehehe / 网上订餐系统

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
InernetSaleMainStyle.master.cs 2.02 KB
一键复制 编辑 原始数据 按行查看 历史
maxinehehe 提交于 2018-02-04 20:18 . 提交课程设计 网上订餐
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class InernetSaleMainStyle : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["currentUser"] != null && Session["userStatus"] != null)
{
LBLogin.Visible = false;
LBRegister.Visible = false;
String status = Session["userStatus"].ToString();
String username = Session["currentUser"].ToString();
LBUserStatus.Text =status+":"+username;
BtnExit.Visible = true;
}
else
{
BtnExit.Visible = false;
}
}
protected void IBLogin_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Login2.aspx");
}
protected void BtnExit_Click(object sender, EventArgs e)
{
Session["currentUser"] = null;
Response.Redirect("ShowFoods.aspx");
}
protected void LBRegister_Click(object sender, ImageClickEventArgs e)
{
Response.Redirect("Register.aspx");
}
// 搜索按钮
protected void ImageButtonSearch_Click(object sender, ImageClickEventArgs e)
{
String key = TBSearch.Text;
Session["searchKey"] = key;
Response.Redirect("searchResultPage.aspx");
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
if (Session["currentUser"] != null)
Response.Redirect("shoppingCart.aspx");
else
Response.Write("<script>document.location=document.location;alert('您还未登录!')</script>");
}
protected void LinkButton2_Click(object sender, EventArgs e)
{
if (Session["currentUser"] != null)
Response.Redirect("myOrder.aspx");
else
Response.Write("<script>document.location=document.location;alert('您还未登录!')</script>");
}
}
ASP
1
https://gitee.com/maxinehehe/asp_project.git
git@gitee.com:maxinehehe/asp_project.git
maxinehehe
asp_project
网上订餐系统
master

搜索帮助