-
大小: 452KB文件類型: .rar金幣: 2下載: 1 次發(fā)布日期: 2021-05-20
- 語言: C#
- 標(biāo)簽:
資源簡介
C#學(xué)生社團(tuán)管理系統(tǒng) (源代碼+數(shù)據(jù)庫+文檔)

代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Text;
using?System.Windows.Forms;
using?System.Data.SqlClient;
namespace?community
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}
????????SqlConnection?conn?=?null;
????????SqlDataAdapter?da?=?null;
????????DataSet?ds?=?null;
????????SqlCommandBuilder?myCB;
????????private?void?Form1_Load(object?sender?EventArgs?e)
????????{
????????????//?TODO:?這行代碼將數(shù)據(jù)加載到表“zhglDataSet5.massorganizationsmember”中。您可以根據(jù)需要移動或移除它。
????????????this.massorganizationsmemberTableAdapter.Fill(this.zhglDataSet5.massorganizationsmember);
????????????
????????????try
????????????{
????????????????string?s?=?“data?source=localhost;database=zhgl;Integrated?Security=True;Pooling=False“;
????????????????conn?=?new?SqlConnection(s);
????????????????conn.Open();
????????????}
????????????catch?(Exception?e1)
????????????{
????????????????MessageBox.Show(e1.Message?“提示“);
????????????}
????????????da?=?new?SqlDataAdapter();
????????????ds?=?new?DataSet();
????????????string?sql?=?“select?*?from?massorganizationsinfo“;
????????????da.SelectCommand?=?new?SqlCommand(sql?conn);
????????????da.Fill(ds?“mytable“);
????????????myCB?=?new?SqlCommandBuilder(da);
????????????massorganizationsinfo.DataSource?=?ds;
????????????massorganizationsinfo.DataMember?=?“mytable“;
????????????dataGridView1.DataSource?=?massorganizationsinfo;
????????}
????????private?void?tabControl1_SelectedIndexChanged(object?sender?EventArgs?e)
????????{
????????????if?(tabControl1.SelectedIndex?==?1)
????????????{????????????????
????????????????da?=?new?SqlDataAdapter();
????????????????ds?=?new?DataSet();
????????????????string?sql?=?“select?*?from?massorganizationsmember“;
????????????????da.SelectCommand?=?new?SqlCommand(sql?conn);
????????????????da.Fill(ds?“mytable“);
????????????????myCB?=?new?SqlCommandBuilder(da);
????????????????massorganizationsmember.DataSource?=?ds;
????????????????massorganizationsmember.DataMember?=?“mytable“;
????????????????dataGridView2.DataSource?=?massorganizationsmember;
????????????}
????????????if?(tabControl1.SelectedIndex?==?2)
????????????{
????????????????da?=?new?SqlDataAdapter();
????????????????ds?=?new?DataSet();
????????????????string?sql?=?“select?*?from?massorganizationsexercise“;
????????????????da.SelectCommand?=?new?SqlCommand(sql?conn);
????????????????da.Fill(ds?“mytable“);
????????????????myCB?=?new?SqlCommandBuilder(da);
????????????????massorganizationsexercise.DataSource?=?ds;
????????????????massorganizationsexercise.DataMember?=?“mytable“;
????????????????dataGridView3.DataSource?=?massorganizationsexercise;
????????????}
????????}
????????private?void?informationtextBox1_TextChanged(object?sender?EventArgs?e)
????????{
????????????string?s?=?“data?source=
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件????????916??2011-06-18?16:26??community\community.sln
????..A..H.?????26624??2011-06-21?18:56??community\community.suo
?????文件??????????1??2011-06-18?16:50??community\community\ClassDiagram1.cd
?????文件???????7466??2011-06-21?18:26??community\community\community.csproj
?????文件????????168??2011-06-18?16:50??community\community\community.csproj.user
?????文件????????468??2011-06-18?16:26??community\community\Program.cs
?????文件??????46616??2011-06-18?16:54??community\community\zhglDataSet.Designer.cs
?????文件??????????3??2011-06-18?16:54??community\community\zhglDataSet.xsc
?????文件??????12672??2011-06-18?16:54??community\community\zhglDataSet.xsd
?????文件??????????3??2011-06-18?16:54??community\community\zhglDataSet.xss
?????文件????????609??2011-06-21?18:18??community\community\app.config
?????文件??????12683??2011-06-21?18:18??community\community\zhglDataSet1.xsd
?????文件??????46636??2011-06-21?18:18??community\community\zhglDataSet1.Designer.cs
?????文件??????????3??2011-06-21?18:18??community\community\zhglDataSet1.xss
?????文件??????????3??2011-06-21?18:18??community\community\zhglDataSet1.xsc
?????文件??????11727??2011-06-21?18:19??community\community\zhglDataSet2.xsd
?????文件??????45023??2011-06-21?18:19??community\community\zhglDataSet2.Designer.cs
?????文件??????????3??2011-06-21?18:19??community\community\zhglDataSet2.xss
?????文件??????????3??2011-06-21?18:19??community\community\zhglDataSet2.xsc
?????文件??????14867??2011-06-21?18:20??community\community\zhglDataSet3.xsd
?????文件??????50763??2011-06-21?18:20??community\community\zhglDataSet3.Designer.cs
?????文件??????????3??2011-06-21?18:20??community\community\zhglDataSet3.xss
?????文件??????????3??2011-06-21?18:20??community\community\zhglDataSet3.xsc
?????文件??????12683??2011-06-21?18:24??community\community\zhglDataSet4.xsd
?????文件??????46636??2011-06-21?18:24??community\community\zhglDataSet4.Designer.cs
?????文件??????????3??2011-06-21?18:24??community\community\zhglDataSet4.xss
?????文件??????????3??2011-06-21?18:24??community\community\zhglDataSet4.xsc
?????文件??????11727??2011-06-21?18:25??community\community\zhglDataSet5.xsd
?????文件??????45023??2011-06-21?18:25??community\community\zhglDataSet5.Designer.cs
?????文件??????????3??2011-06-21?18:25??community\community\zhglDataSet5.xss
............此處省略48個(gè)文件信息
- 上一篇:C#寫性能服務(wù)器
- 下一篇:使用C#在Unity中制作VR游戲
評論
共有 條評論