- 4
- 0
- 约7.13千字
- 约 17页
- 2017-10-06 发布于河南
- 举报
实训学习文档(c# .net)(Training study document (c#.Net))
实训学习文档(c# .net)(Training study document (c#.Net))
(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.ConnectionStrings[, Constr,].ToString ();
(8) check to see if you are logged in
Public, bool, CheckLogin ()
{
If (HttpContext.Current.Session[AdminID] = = null)
{
HttpContext.Current.Response.Write (scripttop.location.href=Login.aspx
您可能关注的文档
- 太和(Wo).doc
- 太宰治的《斜阳》与~族语探源(Taijae Ji's the sun and to the origin of language).doc
- 太祖的工业建设(The construction of the industrial Dynasty).doc
- 太阁立志传5 常用小攻略(II taikourisshiden 5 commonly used small.).doc
- 太阁立志传5修业小游戏之我见(II taikourisshiden 5 grand game I see).doc
- 太阳宝归纳太阳能渠道管理版唐伯虎点秋喷鼻(Sun Po summed up the solar channel management edition, Tang Tong point, autumn nose).doc
- 太阳神圆梦体系刮痧培训二(Sun god dream system scraping training two).doc
- 太阳能利用结课论文(Solar energy utilization course).doc
- 太阳能热水系统智能控制器(Intelligent controller for solar water heating system).doc
- 太阳能电池学生ppt(Solar cell student ppt).doc
最近下载
- 2026年浙江档案职称考试(档案工作实务)历年参考题库含答案详解.docx VIP
- 南通佳宜有限公司办公楼建筑结构设计.docx
- 拼拼豆教程及图案汇总[已排版可直接打印].doc VIP
- 共情传播视角下的网络微短剧叙事分析.docx VIP
- 贵阳市2024届高三适应性考试(一)一模物理试卷(含答案).docx
- 高中物理运动和力的关系10道计算题专题.docx VIP
- 语言学及应用语言学专业硕士研究生培养方案﹙050102﹚.docx VIP
- 10以内加减混合填空题(30页).docx
- 三相四线电能表不接零线电量分析0516..doc VIP
- 2025年乡村医生招聘考试试题题及答案.docx VIP
原创力文档

文档评论(0)