cpinex.aspx.cs

来自「主要功能: 1、 包括顾客信息、货品信息、定单信息的管理。 2、」· CS 代码 · 共 1,483 行 · 第 1/4 页

CS
1,483
字号
			this.Pdata4.Visible=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=false;
			this.Pdata9.Visible=false;
			this.Pdata10.Visible=false;
			this.Pdata11.Visible=false;
			this.Pselet.Visible=false;

			this.H1.Enabled=true;//一
			this.H2.Enabled=true;//二
			this.H3.Enabled=true;//三
			this.H4.Enabled=true;//四
			this.H5.Enabled=true;//五
			this.H6.Enabled=true;//六
			this.H7.Enabled=true;
			this.H8.Enabled=true;
			this.H9.Enabled=true;
			this.H10.Enabled=true;
			this.H11.Enabled=true;
			this.H12.Enabled=true;
			this.H13.Enabled=true;
			this.H14.Enabled=true;
			this.H15.Enabled=true;
			this.H16.Enabled=true;
			this.H17.Enabled=true;
			this.H18.Enabled=true;
			this.Panel4.Visible=false;//产品标题
			this.Label2.Visible=false;//横线
			this.Image24.Visible=true;//竖图
			this.Image25.Visible=true;//横图
			this.Panel5.Visible=true;//保养
			this.Panel6.Visible=true;//维修
		}

		private void H1_Click(object sender, System.EventArgs e)//第一排子菜单
		{
			this.Label6.Visible=false;//数据不存在激活label6
			this.Label7.Visible=false;//横线

			this.Pdata1.Visible=true;//数据表格控件
			this.Pdata2.Visible=false;
			this.Pdata3.Visible=false;
			this.Pdata4.Visible=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=false;
			this.Pdata9.Visible=false;
			this.Pdata10.Visible=false;
			this.Pdata11.Visible=false;
			this.Pselet.Visible=false;//搜索

			this.H1.Enabled=false;//一
			this.H2.Enabled=true;//二
			this.H3.Enabled=true;//三
			this.H4.Enabled=true;//四
			this.H5.Enabled=true;//五
			this.H6.Enabled=true;//六
			this.H7.Enabled=true;
			this.H8.Enabled=true;
			this.H9.Enabled=true;
			this.H10.Enabled=true;
			this.H11.Enabled=true;
			this.H12.Enabled=true;
			this.H13.Enabled=true;
			this.H14.Enabled=true;
			this.H15.Enabled=true;
			this.H16.Enabled=true;
			this.H17.Enabled=true;
			this.H18.Enabled=true;
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			string sql="select * from 燃气热水器";
			OleDbDataAdapter mydata=new OleDbDataAdapter(sql,conn);
			DataSet sa=new DataSet();
			mydata.Fill(sa,"燃气热水器");
			if(sa.Tables["燃气热水器"].Rows.Count>0)
			{
				this.DataGrid2.DataSource=sa.Tables["燃气热水器"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid2.DataBind();
			}
			else
			{
				this.Label6.Visible=true;
				this.Label7.Visible=true;
			}		
		}	
		private void BindData1()//第一排数据重绑数据
		{
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			conn.Open();
			string sqlstr= "select * from 燃气热水器";
			OleDbDataAdapter dataAdapter = new OleDbDataAdapter(sqlstr,connstr);
			DataSet ds =new DataSet();
			dataAdapter.Fill(ds,"燃气热水器");
			conn.Close();
			this.DataGrid2.DataSource=ds;
			this.DataGrid2.DataBind();
		}
		private void DataGrid2_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)//第一排分页效果
		{
			this.DataGrid2.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData1();
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修			
		}

		private void H2_Click(object sender, System.EventArgs e)//第二排子菜单
		{
			this.Label6.Visible=false;
			this.Label7.Visible=false;//暂无货物控件

			this.Pdata1.Visible=false;//数据表格控件
			this.Pdata2.Visible=true;
			this.Pdata3.Visible=false;
			this.Pdata4.Visible=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=false;
			this.Pdata9.Visible=false;
			this.Pdata10.Visible=false;
			this.Pdata11.Visible=false;
			this.Pselet.Visible=false;//搜索

			this.H1.Enabled=true;//一
			this.H2.Enabled=false;//二
			this.H3.Enabled=true;//三
			this.H4.Enabled=true;//四
			this.H5.Enabled=true;//五
			this.H6.Enabled=true;//六
			this.H7.Enabled=true;
			this.H8.Enabled=true;
			this.H9.Enabled=true;
			this.H10.Enabled=true;
			this.H11.Enabled=true;
			this.H12.Enabled=true;
			this.H13.Enabled=true;
			this.H14.Enabled=true;
			this.H15.Enabled=true;
			this.H16.Enabled=true;
			this.H17.Enabled=true;
			this.H18.Enabled=true;
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			string sql="select * from 饮水机";
			OleDbDataAdapter mydata=new OleDbDataAdapter(sql,conn);
			DataSet sa=new DataSet();
			mydata.Fill(sa,"饮水机");
			if(sa.Tables["饮水机"].Rows.Count>0)
			{
				this.DataGrid3.DataSource=sa.Tables["饮水机"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid3.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData2()//第二排数据重绑数据调用函数
		{
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			conn.Open();
			string sqlstr= "select * from 饮水机";
			OleDbDataAdapter dataAdapter = new OleDbDataAdapter(sqlstr,connstr);
			DataSet ds =new DataSet();
			dataAdapter.Fill(ds,"饮水机");
			conn.Close();
			this.DataGrid3.DataSource=ds;
			this.DataGrid3.DataBind();
		}
		private void DataGrid3_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid3.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData2();
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修		
		}

		private void H3_Click(object sender, System.EventArgs e)
		{
			this.Label6.Visible=false;
			this.Label7.Visible=false;//暂无货物控件

			this.Pdata1.Visible=false;//数据表格控件
			this.Pdata2.Visible=false;
			this.Pdata3.Visible=true;
			this.Pdata4.Visible=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=false;
			this.Pdata9.Visible=false;
			this.Pdata10.Visible=false;
			this.Pdata11.Visible=false;
			this.Pselet.Visible=false;//搜索

			this.H1.Enabled=true;//一
			this.H2.Enabled=true;//二
			this.H3.Enabled=false;//三
			this.H4.Enabled=true;//四
			this.H5.Enabled=true;//五
			this.H6.Enabled=true;//六
			this.H7.Enabled=true;
			this.H8.Enabled=true;
			this.H9.Enabled=true;
			this.H10.Enabled=true;
			this.H11.Enabled=true;
			this.H12.Enabled=true;
			this.H13.Enabled=true;
			this.H14.Enabled=true;
			this.H15.Enabled=true;
			this.H16.Enabled=true;
			this.H17.Enabled=true;
			this.H18.Enabled=true;
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			string sql="select * from 冰箱";
			OleDbDataAdapter mydata=new OleDbDataAdapter(sql,conn);
			DataSet sa=new DataSet();
			mydata.Fill(sa,"冰箱");
			if(sa.Tables["冰箱"].Rows.Count>0)
			{
				this.DataGrid4.DataSource=sa.Tables["冰箱"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid4.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData3()//第三排数据重绑数据调用函数
		{
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			conn.Open();
			string sqlstr= "select * from 冰箱";
			OleDbDataAdapter dataAdapter = new OleDbDataAdapter(sqlstr,connstr);
			DataSet ds =new DataSet();
			dataAdapter.Fill(ds,"冰箱");
			conn.Close();
			this.DataGrid4.DataSource=ds;
			this.DataGrid4.DataBind();
		}
		private void DataGrid4_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid4.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData3();
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修		
		}

		private void H4_Click(object sender, System.EventArgs e)
		{
			this.Label6.Visible=false;
			this.Label7.Visible=false;//暂无货物控件

			this.Pdata1.Visible=false;//数据表格控件
			this.Pdata2.Visible=false;
			this.Pdata3.Visible=false;
			this.Pdata4.Visible=true;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=false;
			this.Pdata9.Visible=false;
			this.Pdata10.Visible=false;
			this.Pdata11.Visible=false;
			this.Pselet.Visible=false;//搜索

			this.H1.Enabled=true;//一
			this.H2.Enabled=true;//二
			this.H3.Enabled=true;//三
			this.H4.Enabled=false;//四
			this.H5.Enabled=true;//五
			this.H6.Enabled=true;//六
			this.H7.Enabled=true;
			this.H8.Enabled=true;
			this.H9.Enabled=true;
			this.H10.Enabled=true;
			this.H11.Enabled=true;
			this.H12.Enabled=true;
			this.H13.Enabled=true;
			this.H14.Enabled=true;
			this.H15.Enabled=true;
			this.H16.Enabled=true;
			this.H17.Enabled=true;
			this.H18.Enabled=true;
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			string sql="select * from 彩电";
			OleDbDataAdapter mydata=new OleDbDataAdapter(sql,conn);
			DataSet sa=new DataSet();
			mydata.Fill(sa,"彩电");
			if(sa.Tables["彩电"].Rows.Count>0)
			{
				this.DataGrid5.DataSource=sa.Tables["彩电"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid5.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData4()//第四排数据重绑数据调用函数
		{
			string connstr=@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Server.MapPath(@".\databast.mdb");
			OleDbConnection conn=new OleDbConnection(connstr);
			conn.Open();
			string sqlstr= "select * from 彩电";
			OleDbDataAdapter dataAdapter = new OleDbDataAdapter(sqlstr,connstr);
			DataSet ds =new DataSet();
			dataAdapter.Fill(ds,"彩电");
			conn.Close();
			this.DataGrid5.DataSource=ds;
			this.DataGrid5.DataBind();
		}

		private void DataGrid5_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid5.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData4();
			this.Panel4.Visible=true;//产品标题
			this.Label2.Visible=true;//横线
			this.Image24.Visible=false;//竖图
			this.Image25.Visible=false;//横图
			this.Panel5.Visible=false;//保养
			this.Panel6.Visible=false;//维修		

⌨️ 快捷键说明

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