• Wpf音乐播放器

    WPF开发的一个简单的播放器,用windows自带的mediaplay实现的一个简单的音乐播放器,可以添加和删除音乐菜单

    0
    212
    45.92MB
    2014-01-11
    9
  • ASP.NET传值问题

    asp.net 使用各种技术在页面间传值……分析各种方法的不同几个字的优缺点

    0
    82
    93KB
    2011-10-05
    0
  • 学生管理系统--C#

    C#学生管理系统 主要代码: (1)自定义函数类代码: public class LinkDataBase { private string strSQL; //与SQL Server 的连接字符串设置 //与数据库的连接 private string connectionString = "server = .;database=stu_Manage;uid=sa;pwd=123"; private static SqlConnection con = new SqlConnection("server = .;database=stu_Manage;uid=sa;pwd=123"); private SqlConnection myConnection; private DataSet ds = new DataSet(); private SqlDataAdapter da; public DataSet SelectDataBase(string tempStrSQL, string tempTableName) //根据输入的SQL语句检索数据库数据 { this.strSQL = tempStrSQL; this.myConnection = new SqlConnection(connectionString); this.da = new SqlDataAdapter(this.strSQL, this.myConnection); this.ds.Clear(); this.da.Fill(ds, tempTableName); //返回填充了数据的DataSet,其中数据表以tempTableName给出的字符串命名 return ds; } public DataTable SelectDataBase(string tempStrSQL) //检索数据库数据(传字符串直接操作数据库) { this.myConnection = new SqlConnection(connectionString); DataSet tempDataSet = new DataSet(); this.da = new SqlDataAdapter (tempStrSQL, this.myConnection); this.da.Fill(tempDataSet); return tempDataSet.Tables[0]; } public void deleteInfo(string strcmd)//删除信息 { SqlCommand cmd = new SqlCommand(strcmd, con); try { con.Open(); if (MessageBox.Show("确定要删除吗?", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK) { cmd.ExecuteNonQuery(); MessageBox.Show("删除成功!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); return; } finally { con.Close(); } } public void addInfo(string strcmd)//定义添加信息事件 { try { con.Open(); SqlCommand cmd = new SqlCommand(strcmd, con); cmd.ExecuteNonQuery(); MessageBox.Show("添加成功"); } catch (Exception ex) { MessageBox.Show(ex.Message); return; } finally { con.Close(); } } public void updateInfo(string strcmd)//自定义更新信息方法 { try { con.Open(); SqlCommand cmd = new SqlCommand(strcmd, con); cmd.ExecuteNonQuery(); MessageBox.Show("修改成功"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } } . . . . . . . . . (2) > . . .

    4
    154
    3.4MB
    2011-07-02
    9
  • C#控件只能输入数字代码

    C#控件只能输入数字代码 最好弄个自定义控件,继承TextBox,重写OnKeyPress事件

    0
    108
    361B
    2011-03-31
    11
  • 创作能手

    授予每个自然周发布1篇到3篇原创IT博文的用户
关注 私信
上传资源赚积分or赚钱