当前位置:首页 > 网络编程 > WEB编程 > ASP.net >  DataSet 添加数据集、行、列、主键和外键等操作示例1

 DataSet 添加数据集、行、列、主键和外键等操作示例1

点击次数:22 次 发布日期:2008-11-26 11:28:13 作者:源代码网
源代码网推荐      前台代码:html
源代码网推荐  <%@ Page language="c#" Codebehind="CodeUse.aspx.cs" AutoEventWireup="false" Inherits="DsAndXML.CodeUse" %>
源代码网推荐  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
源代码网推荐  <HTML>
源代码网推荐   <HEAD>
源代码网推荐   <title>CodeUse</title>
源代码网推荐   <meta content="Microsoft Visual Studio 7.0" name="GENERATOR">
源代码网推荐   <meta content="C#" name="CODE_LANGUAGE">
源代码网推荐   <meta content="javascript" name="vs_defaultClientScript">
源代码网推荐   <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
源代码网推荐   </HEAD>
源代码网推荐   <body MS_POSITIONING="GridLayout">
源代码网推荐   <form id="CodeUse" method="post" runat="server">
源代码网推荐   <FONT face="宋体">
源代码网推荐   <asp:button id="btnCreate" style="Z-INDEX: 100; LEFT: 31px; POSITION: absolute; TOP: 43px" runat="server" Height="36" Width="130" Text="创建数据集和数据表"></asp:button>
源代码网推荐   <asp:Button id="btnUpdateDs" style="Z-INDEX: 117; LEFT: 35px; POSITION: absolute; TOP: 439px" runat="server" Height="36px" Width="131px" Text="赋值"></asp:Button>
源代码网推荐   <asp:Label id="Label3" style="Z-INDEX: 112; LEFT: 352px; POSITION: absolute; TOP: 395px" runat="server">列号:</asp:Label>
源代码网推荐   <asp:Label id="Label2" style="Z-INDEX: 111; LEFT: 209px; POSITION: absolute; TOP: 395px" runat="server">行号:</asp:Label>
源代码网推荐   <asp:Button id="btnUpdateMID" style="Z-INDEX: 107; LEFT: 37px; POSITION: absolute; TOP: 330px" runat="server" Height="36" Width="131" Text="修改MasterID"></asp:Button>
源代码网推荐   <asp:Button id="btnAddForeign" style="Z-INDEX: 106; LEFT: 35px; POSITION: absolute; TOP: 278px" runat="server" Height="36" Width="131" Text="添加外键"></asp:Button>
源代码网推荐   <asp:Button id="Button1" style="Z-INDEX: 105; LEFT: 31px; POSITION: absolute; TOP: 217px" runat="server" Height="36px" Width="130px" Text="添加唯一键"></asp:Button><asp:button id="btnAddRow" style="Z-INDEX: 102; LEFT: 31px; POSITION: absolute; TOP: 161px" runat="server" Height="36px" Width="130px" Text="添加行"></asp:button><asp:button id="btnAddColumn" style="Z-INDEX: 101; LEFT: 31px; POSITION: absolute; TOP: 102px" runat="server" Height="36px" Width="130px" Text="添加列"></asp:button><asp:datagrid id="dgMaster" style="Z-INDEX: 103; LEFT: 242px; POSITION: absolute; TOP: 40px" runat="server" Height="120px" Width="485px"></asp:datagrid><asp:datagrid id="dgChild" style="Z-INDEX: 104; LEFT: 240px; POSITION: absolute; TOP: 193px" runat="server" Height="111px" Width="479px"></asp:datagrid>
源代码网推荐   <asp:TextBox id="tbRow" style="Z-INDEX: 108; LEFT: 275px; POSITION: absolute; TOP: 395px" runat="server" Width="54px"></asp:TextBox>
源代码网推荐   <asp:TextBox id="tbCol" style="Z-INDEX: 109; LEFT: 422px; POSITION: absolute; TOP: 395px" runat="server" Width="64px"></asp:TextBox>
源代码网推荐   <asp:Label id="Label1" style="Z-INDEX: 110; LEFT: 520px; POSITION: absolute; TOP: 399px" runat="server">值:</asp:Label>
源代码网推荐   <asp:TextBox id="tbResult" style="Z-INDEX: 113; LEFT: 585px; POSITION: absolute; TOP: 394px" runat="server" Width="145px"></asp:TextBox>
源代码网推荐   <asp:Label id="Label4" style="Z-INDEX: 114; LEFT: 209px; POSITION: absolute; TOP: 344px" runat="server">表:</asp:Label>
源代码网推荐   <asp:DropDownList id="ddlTable" style="Z-INDEX: 115; LEFT: 277px; POSITION: absolute; TOP: 341px" runat="server">
源代码网推荐   <asp:ListItem Value="0">表一</asp:ListItem>
源代码网推荐   <asp:ListItem Value="1">表二</asp:ListItem>
源代码网推荐   </asp:DropDownList>
源代码网推荐   <asp:Button id="Button2" style="Z-INDEX: 116; LEFT: 35px; POSITION: absolute; TOP: 389px" runat="server" Height="36px" Width="131px" Text="求值"></asp:Button></FONT></form>
源代码网推荐   </body>
源代码网推荐  </HTML>
源代码网推荐  后台代码: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;
源代码网推荐  
源代码网推荐  namespace DsAndXML
源代码网推荐  {
源代码网推荐   /**//// <summary>
源代码网推荐   /// CodeUse 的摘要说明。
源代码网推荐   /// </summary>
源代码网推荐   public class CodeUse : System.Web.UI.Page
源代码网推荐   {
源代码网推荐   protected System.Web.UI.WebControls.Button btnAddColumn;
源代码网推荐   protected System.Web.UI.WebControls.Button btnAddRow;
源代码网推荐   protected System.Web.UI.WebControls.DataGrid dgMaster;
源代码网推荐   protected System.Web.UI.WebControls.DataGrid dgChild;
源代码网推荐   protected System.Web.UI.WebControls.Button Button1;
源代码网推荐   protected System.Web.UI.WebControls.Button btnAddForeign;
源代码网推荐   protected System.Web.UI.WebControls.Button btnUpdateMID;
源代码网推荐   protected System.Web.UI.WebControls.TextBox tbRow;
源代码网推荐   protected System.Web.UI.WebControls.TextBox tbCol;
源代码网推荐   protected System.Web.UI.WebControls.Label Label1;
源代码网推荐   protected System.Web.UI.WebControls.Label Label2;
源代码网推荐   protected System.Web.UI.WebControls.Label Label3;
源代码网推荐   protected System.Web.UI.WebControls.TextBox tbResult;
源代码网推荐   protected System.Web.UI.WebControls.Label Label4;
源代码网推荐   protected System.Web.UI.WebControls.DropDownList ddlTable;
源代码网推荐   protected System.Web.UI.WebControls.Button Button2;
源代码网推荐   protected System.Web.UI.WebControls.Button btnUpdateDs;
源代码网推荐   protected System.Web.UI.WebControls.Button btnCreate;
源代码网推荐  
源代码网推荐  
源代码网推荐  
源代码网推荐    做人要厚道,请注明转自酷网动力(www.ASPCOOL.COM)。
源代码网推荐


源代码网供稿.
网友评论 (0)
会员中心
网络编程
本站推荐
网络编程之精华