摘要: --====================简单的查增删改=学云网-天轰穿-[url]www.ixueyun.com[/url]===========--查看学生表的全部数据select * from studio --插入一个新的学生信息insert into studio(st_name,st_sex,st_age,st_add,st_tel) values("黄兰淇",0,36,'南充','13943943334')--查看class全部数据select * from class--向class表增加两条条数据insert into c 阅读全文
posted @ 2012-05-29 10:40 念余温 阅读(290) 评论(0) 推荐(0) 编辑
摘要: 第一我先建好一个控件 有三个下拉框分别命名为:cboxYear,cboxMonth,cboxDay;后台代码如下: #region 获取选定的年 private string strCboxYear; public string StrCboxYear { get { return cboxYear.Text.Trim(); } set { strCboxYear= value; } } #endregion #region 获取选定的月份 priv... 阅读全文
posted @ 2012-05-29 08:39 念余温 阅读(9981) 评论(0) 推荐(0) 编辑
摘要: public Form1() { InitializeComponent(); #region AddStatusStrip //1. 定义要增加的StatusStrip StatusStrip sb = new StatusStrip(); //2. 定义StatusStrip项目中的控件,其中ToolStripLabel是一個相似於label的控件,現在用於顯示文字 ToolStripLabel tsl = new ToolStri... 阅读全文
posted @ 2012-05-28 11:27 念余温 阅读(3976) 评论(0) 推荐(0) 编辑
摘要: 说实话以前没做过C/S方面的项目 ,只是做ASP.NET WEB方面的工作,虽然 说C/S在学校学过一点,但只是皮毛。比如网上常见的登录窗体到主窗体关闭登录窗体 ,窗体传值刷新父窗体....总结如下:1、登录到主窗体 并关闭登录 窗体在programm.cs修改代码: static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(... 阅读全文
posted @ 2012-05-25 09:51 念余温 阅读(632) 评论(2) 推荐(0) 编辑
摘要: 网络上有几种方法,先总结如下:调用窗体(父):Form1,被调用窗体(子):Form2方法1: 所有权法//Form1://需要有一个公共的刷新方法public void Refresh_Method(){//...}//在调用Form2时,要把Form2的所有者设为Form1Form2 f2 = new Form2() ;f2.Owner = this;f2.ShowDialog() ;//Form2://在需要对其调用者(父)刷新时Form1 f1 ;f1 = (Form1)this.Owner;f1.Refresh_Method() ;方法2:自身传递法//Form1://需要有一个公共 阅读全文
posted @ 2012-05-25 09:18 念余温 阅读(4673) 评论(0) 推荐(1) 编辑
摘要: 此例分三个页面分别为:default.aspx用于支付显示后的页面包括商品名称,支付金额等。SubmitPayPage.aspx为提交支付的页面 ,跳转到支付宝官方网站NoticeReturn.aspx系统返回页面(对账页面)1、default.aspx为HTML代码 没有内容显示而default.aspx.cs代码如下:using System;using System.Collections.Specialized;using System.IO;using System.Net;using System.Security.Cryptography;using System.Text;us 阅读全文
posted @ 2012-05-23 08:21 念余温 阅读(5293) 评论(0) 推荐(0) 编辑
摘要: 首先在programm.cs里设置登录窗体显示 static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefaul... 阅读全文
posted @ 2012-05-22 10:41 念余温 阅读(6911) 评论(0) 推荐(2) 编辑
摘要: 用代码生成器生成的 目前正在使用中 基本满足常见的数据操作需求了。using System;using System.Collections;using System.Collections.Specialized;using System.Data;using System.Data.SqlClient;using System.Configuration;using System.Data.Common;using System.Collections.Generic;namespace Maticsoft.DBUtility{ /// <summary> /// 数据访问抽象 阅读全文
posted @ 2012-05-21 08:41 念余温 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 遍历查询窗体界面的textbox为空值 foreach (System.Windows.Forms.Control control in this.Controls) { if (control is TextBox) { TextBox tx = (TextBox)control; tx.Text = string.Empty; } } 一列数的规则如下: 1、1、2、3、5、8、1... 阅读全文
posted @ 2012-05-17 15:38 念余温 阅读(411) 评论(0) 推荐(1) 编辑
摘要: 在页面上 <asp:Repeater ID="Repeater1" runat="server" OnItemCommand="Repeater1_ItemCommand" > <ItemTemplate> <div style="width:200px; height:100px; background-color:Green;"><%#Container.DataItem%>> </div> </ItemTemplate> </ 阅读全文
posted @ 2012-05-17 09:37 念余温 阅读(2173) 评论(0) 推荐(1) 编辑