cpinex.aspx.cs

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

CS
1,483
字号
		}

		private void H5_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=false;
			this.Pdata5.Visible=true;
			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=false;//五
			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.DataGrid6.DataSource=sa.Tables["洗衣机"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid6.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData5()//第五排数据重绑数据调用函数
		{
			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.DataGrid6.DataSource=ds;
			this.DataGrid6.DataBind();
		}
		private void DataGrid6_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid6.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData5();
			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 H6_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=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=true;
			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=false;//六
			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.DataGrid7.DataSource=sa.Tables["空调"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid7.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData6()//第六排数据重绑数据调用函数
		{
			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.DataGrid7.DataSource=ds;
			this.DataGrid7.DataBind();
		}

		private void DataGrid7_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid7.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData6();
			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 H7_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=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=true;
			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=false;
			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.DataGrid8.DataSource=sa.Tables["嵌入式双灶"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid8.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData7()//第七排数据重绑数据调用函数
		{
			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.DataGrid8.DataSource=ds;
			this.DataGrid8.DataBind();		
		}

		private void DataGrid8_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid8.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData7();
			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 H8_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=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=true;
			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=false;
			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.DataGrid9.DataSource=sa.Tables["嵌入式消毒柜"].DefaultView;//获取里面的数据并存入DataGrid数据源中
				this.DataGrid9.DataBind();
			}
			else
			{
				this.Label6.Visible=true;//数据不存在激活label6
				this.Label7.Visible=true;//横线
			}		
		}
		private void BindData8()//第八排数据重绑数据调用函数
		{
			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.DataGrid9.DataSource=ds;
			this.DataGrid9.DataBind();		
		}

		private void DataGrid9_PageIndexChanged(object source, System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
		{
			this.DataGrid9.CurrentPageIndex=e.NewPageIndex;//设置当前页的索引值为用户选择的页的索引
			BindData8();
			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 H9_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=false;
			this.Pdata5.Visible=false;
			this.Pdata6.Visible=false;
			this.Pdata7.Visible=false;
			this.Pdata8.Visible=false;
			this.Pdata9.Visible=true;
			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=false;
			this.H10.Enabled=true;
			this.H11.Enabled=true;
			this.H12.Enabled=true;

⌨️ 快捷键说明

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