⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 deliverymethodaddress.aspx.cs

📁 PetShop实现的是一个网上购物的系统功能
💻 CS
字号:
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using PetShop.Components;


namespace PetShop.Web
{
	/// <summary>
	/// DeliveryMethodAddress 的摘要说明。
	/// </summary>
	public partial class DeliveryMethodAddress : System.Web.UI.Page
	{
	
		protected void Page_Load(object sender, System.EventArgs e)
		{
			this.DataGrid1.DataSource=new PetShop.Components.Selectstore().GetAll();
			this.DataGrid1.DataBind();

		    

		}

		#region Web 窗体设计器生成的代码
		override protected void OnInit(EventArgs e)
		{
			//
			// CODEGEN: 该调用是 ASP.NET Web 窗体设计器所必需的。
			//
			InitializeComponent();
			base.OnInit(e);
		}
		
		/// <summary>
		/// 设计器支持所需的方法 - 不要使用代码编辑器修改
		/// 此方法的内容。
		/// </summary>
		private void InitializeComponent()
		{    
			this.ImageButton1.Click += new System.Web.UI.ImageClickEventHandler(this.ImageButton1_Click);

		}
		#endregion

		private void ImageButton1_Click(object sender, System.Web.UI.ImageClickEventArgs e)
		{
			string strdm=Request.Form["radio"];
			int intdm=0;
			string ShopName;
			if(strdm==null)
			{
				meg.Text="Please select a shop!";
				meg.Visible=true;
			}
			else
			{
				meg.Visible=false;
				intdm=Convert.ToInt32(strdm);		
				Hashtable adr = (Hashtable)Session["ShoppingAddressSession"];
				PetShop.Components.Selectstore st=new Selectstore();
				ShopName=st.GetShopName(intdm);
				if (adr == null) 
				{
					// don't have one yet, go ahead and create it
					adr = new Hashtable();
					Session["ShoppingAddressSession"] = adr;
				}
				adr["shopid"]=intdm;			
				adr["shopname"]=ShopName;
				Response.Redirect("PaymentTypeSelect.aspx");		
			}
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -