实训学习文档(c# net)(Training study document (c# net)).docVIP

  • 1
  • 0
  • 约6.76千字
  • 约 17页
  • 2017-10-06 发布于河南
  • 举报

实训学习文档(c# net)(Training study document (c# net)).doc

实训学习文档(c# net)(Training study document (c# net))

实训学习文档(c# net)(Training study document (c# net)) C# net.Txt, if there is an afterlife, to be a tree, standing eternal, no sad gesture. Half in the soil, quiet, half in the wind flying, half fall cool, half bathed in sunshine, very silent, very proud, never rely on never looking for. (1) add data code to the table: A, if (dt.Rows.Count== 0) / / a data table defined in DT itself { DataRow Dr = dt.NewRow (); Dr[AreaID = = 0; Dr[AreaName] = - no geographical information - related; Dr[TypeName = =; Dt.Rows.Add (DR); } Two, DDLCategory.Items.Insert (0, new, ListItem) (not recommended line, 0)); Three, GVPic.Rows[0].Cells[0].Text =; (2) the error handling should be based on the number of error codes, such as: EX.Number==2627 stands for the same data and cannot be used Cmd.parameters.add (@34, sqldbT) value= (3) / / SDR (SQLDataread) represents a For a real input value: I. entity.AdminID=sdr[ADminID,].toString () Two, entity.AdminID=sdr.GetString[, AdminID,].tosting (); (4) cmd=new SqlCommand (con.GetOpen), (); / / used to add code to open the database and database (5) sda=new SqlDataAdapter (CMD); / / SQlDATAREader Sda.Fill (DT); / / add data on the data sheet (6) clear the information of the data tables in the corresponding style in the page Foreach (System.Web.UI.Control, control, in, Controls) { For (int i = 0; I control.Controls.Count; i++) { If (control.Controls[i], is, System.Web.UI.WebControls.TextBox) { System.Web.UI.WebControls.TextBox TB = (System.Web.UI.WebControls.TextBox) control.Controls[i]; Tb.Text =; } } } (7) database connections SqlConnection, con=, null, con=new, Sqlconnection (STR); If (con.State==, ConnectionState.Closed) {con.Open ()} Con.ConnectionString = ConfigurationSettings.AppSettings[, ConStr,].ToString (); I. con.ConnectionString = Data Source=.; Initial Catalog=hjyDB; Integrated Security=True; Two, add name = Constr connectionString= Data Source=.; Initial Catalog=hjyDB; Integrated Security=True / Con.ConnectionString = ConfigurationManager

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档