企業(yè)客戶信息管理系統(tǒng)-代碼_第1頁(yè)
企業(yè)客戶信息管理系統(tǒng)-代碼_第2頁(yè)
企業(yè)客戶信息管理系統(tǒng)-代碼_第3頁(yè)
企業(yè)客戶信息管理系統(tǒng)-代碼_第4頁(yè)
企業(yè)客戶信息管理系統(tǒng)-代碼_第5頁(yè)
已閱讀5頁(yè),還剩56頁(yè)未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、個(gè)印企業(yè)客戶信息管理系統(tǒng)V1.0 using System;using System.Collections.Generic;using System.Linq;using System.Windows.Forms;namespace CompanyPersonnelManagementSystem static class Program STAThread static void Main() Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Login lo =

2、new Login(); lo.ShowDialog(); if (lo.DialogResult = DialogResult.OK) Form /private bool res = false; OleDbConnection con; OleDbDataReader tbread; FormLogin() InitializeComponent(); buttonClose_Click( sender, EventArgs e) Application.Exit(); buttonOk_Click( sender, EventArgs e) getCon(); tbread.Read(

3、); pw = tbread.GetValue(0).ToString(); (pw = textBoxPW.Text) ClassAdminName.adminName = textBoxName.Text; .Close(); MessageBox.Show( MessageBoxButtons.OK); MessageBox.Show(MessageBoxButtons.OK); con.Close(); OleDbDataReader getCon() ConStr = Provider=Microsoft.Jet.OLEDB.4.0;Data source=Provider=Micr

4、osoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = OleDbConnection(ConStr); sql = select adminPassword from tbAdmin where adminName = + textBoxName.Text + ; OleDbCommand cmd = OleDbCommand(sql, con); con.Open(); tbread = cmd.ExecuteReader(); tbread; MessageBox.Show(MessageBoxButtons.OK); public part

5、ial class FormView : Form private OleDbConnection con; private OleDbDataReader tbread; /int row = 0; public FormView() InitializeComponent(); private void FormView_Load(object sender, EventArgs e) getCon(); listViewViewAll.Items.Clear(); try while (tbread.Read() ListViewItem lvi = new ListViewItem(t

6、bread.GetValue(1).ToString(); lvi.SubItems.Add(tbread.GetValue(2).ToString(); lvi.SubItems.Add(tbread.GetValue(3).ToString(); lvi.SubItems.Add(tbread.GetValue(4).ToString(); lvi.SubItems.Add(tbread.GetValue(5).ToString(); lvi.SubItems.Add(tbread.GetValue(6).ToString(); listViewViewAll.Items.Add(lvi)

7、; catch MessageBox.Show(MessageBoxButtons.OK); con.Close(); public OleDbDataReader getCon() try string ConStr = Provider=Microsoft.Jet.OLEDB.4.0;Data source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = new OleDbConnection(ConStr); string sql = select * from tbUserInfo; OleDbComman

8、d cmd = new OleDbCommand(sql, con); con.Open(); tbread = cmd.ExecuteReader(); return tbread; catch MessageBox.Show(MessageBoxButtons.OK); return null; FormMain : Form FormMain() InitializeComponent(); .Hide(); FormLogin fl = FormLogin(); fl.ShowDialog(); FormMain_Load( sender, EventArgs e) labelWelc

9、om.Text = + ClassAdminName.adminName; buttonViewAll_Click( sender, EventArgs e) FormView fv = FormView(); fv.MdiParent = ; fv.Show(); buttonSearch_Click( sender, EventArgs e) FormSearch fs = FormSearch(); fs.MdiParent = ; fs.Show(); buttonAdd_Click( sender, EventArgs e) FormAdd fa = FormAdd(); fa.Md

10、iParent = ; fa.Show(); buttonUpdate_Click( sender, EventArgs e) FormUpdate fu = FormUpdate(); fu.MdiParent = ; fu.Show(); buttonExit_Click( sender, EventArgs e) Application.Exit(); buttonDelete_Click( sender, EventArgs e) FormDelete fd = FormDelete(); fd.MdiParent = ; fd.Show(); button1_Click( sende

11、r, EventArgs e) AboutBox1 aboutbox = AboutBox1(); aboutbox.ShowDialog(); button2_Click( sender, EventArgs e) System.Diagnostics.Process.Start(notepad.exe); button3_Click( sender, EventArgs e) Form1 form1 = Form1(); form1.ShowDialog(); partial class FormSearch / / Required designer variable. / privat

12、e System.ComponentModel.IContainer components = null; / / Clean up any resources being used. / / true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) if (disposing & (components != null) components.Dispose(); base.Dispose(disposing); #region

13、 Windows Form Designer generated code / / Required method for Designer support - do not modify / the contents of this method with the code editor. / private void InitializeComponent() this.groupBoxSearch = new System.Windows.Forms.GroupBox(); this.buttonClear = new System.Windows.Forms.Button(); thi

14、s.buttonSearch = new System.Windows.Forms.Button(); this.textBoxSearch = new System.Windows.Forms.TextBox(); this.radioButtonNumberSearch = new System.Windows.Forms.RadioButton(); this.radioButtonNameSearch = new System.Windows.Forms.RadioButton(); this.listViewView = new System.Windows.Forms.ListVi

15、ew(); this.columnHeader1 = new System.Windows.Forms.ColumnHeader(); this.columnHeader2 = new System.Windows.Forms.ColumnHeader(); this.columnHeader3 = new System.Windows.Forms.ColumnHeader(); this.columnHeader4 = new System.Windows.Forms.ColumnHeader(); this.columnHeader5 = new System.Windows.Forms.

16、ColumnHeader(); this.columnHeader6 = new System.Windows.Forms.ColumnHeader(); this.groupBoxSearch.SuspendLayout(); this.SuspendLayout(); / groupBoxSearch this.groupBoxSearch.Controls.Add(this.buttonClear); this.groupBoxSearch.Controls.Add(this.buttonSearch); this.groupBoxSearch.Controls.Add(this.tex

17、tBoxSearch); this.groupBoxSearch.Controls.Add(this.radioButtonNumberSearch); this.groupBoxSearch.Controls.Add(this.radioButtonNameSearch); this.groupBoxSearch.Dock = System.Windows.Forms.DockStyle.Top; this.groupBoxSearch.Location = new System.Drawing.Point(0, 0); this.groupBoxSearch.Name = groupBox

18、Search; this.groupBoxSearch.Size = new System.Drawing.Size(531, 107); this.groupBoxSearch.TabIndex = 1; this.groupBoxSearch.TabStop = false; this.groupBoxSearch.Text =; this.groupBoxSearch.Enter += new System.EventHandler(this.groupBoxSearch_Enter); / buttonClear this.buttonClear.Location = new Syst

19、em.Drawing.Point(402, 58); this.buttonClear.Name = buttonClear; this.buttonClear.Size = new System.Drawing.Size(75, 23); this.buttonClear.TabIndex = 4; this.buttonClear.Text =; this.buttonClear.UseVisualStyleBackColor = true; this.buttonClear.Click += new System.EventHandler(this.buttonClear_Click);

20、 / buttonSearch this.buttonSearch.Location = new System.Drawing.Point(402, 30); this.buttonSearch.Name = buttonSearch; this.buttonSearch.Size = new System.Drawing.Size(75, 23); this.buttonSearch.TabIndex = 3; this.buttonSearch.Text =; this.buttonSearch.UseVisualStyleBackColor = true; this.buttonSear

21、ch.Click += new System.EventHandler(this.buttonSearch_Click); / textBoxSearch this.textBoxSearch.Location = new System.Drawing.Point(171, 46); this.textBoxSearch.Name = textBoxSearch; this.textBoxSearch.Size = new System.Drawing.Size(195, 21); this.textBoxSearch.TabIndex = 2; / radioButtonNumberSear

22、ch this.radioButtonNumberSearch.AutoSize = true; this.radioButtonNumberSearch.Location = new System.Drawing.Point(47, 65); this.radioButtonNumberSearch.Name = radioButtonNumberSearch; this.radioButtonNumberSearch.Size = new System.Drawing.Size(107, 16); this.radioButtonNumberSearch.TabIndex = 1; thi

23、s.radioButtonNumberSearch.TabStop = true; this.radioButtonNumberSearch.Text =; this.radioButtonNumberSearch.UseVisualStyleBackColor = true; / radioButtonNameSearch this.radioButtonNameSearch.AutoSize = true; this.radioButtonNameSearch.Location = new System.Drawing.Point(47, 30); this.radioButtonName

24、Search.Name = radioButtonNameSearch; this.radioButtonNameSearch.Size = new System.Drawing.Size(107, 16); this.radioButtonNameSearch.TabIndex = 0; this.radioButtonNameSearch.TabStop = true; this.radioButtonNameSearch.Text =; this.radioButtonNameSearch.UseVisualStyleBackColor = true; / listViewView th

25、is.listViewView.Columns.AddRange(new System.Windows.Forms.ColumnHeader this.columnHeader1, this.columnHeader2, this.columnHeader3, this.columnHeader4, this.columnHeader5, this.columnHeader6); this.listViewView.Dock = System.Windows.Forms.DockStyle.Bottom; this.listViewView.FullRowSelect = true; this

26、.listViewView.GridLines = true; this.listViewView.Location = new System.Drawing.Point(0, 108); this.listViewView.Name = listViewView; this.listViewView.Size = new System.Drawing.Size(531, 132); this.listViewView.TabIndex = 0; this.listViewView.UseCompatibleStateImageBehavior = false; this.listViewVi

27、ew.View = System.Windows.Forms.View.Details; / columnHeader1 this.columnHeader1.Text =; this.columnHeader1.Width = 70; / columnHeader2 this.columnHeader2.Text =; this.columnHeader2.Width = 72; / columnHeader3 this.columnHeader3.Text =; this.columnHeader3.Width = 88; / columnHeader4 this.columnHeader

28、4.Text =; this.columnHeader4.Width = 134; / columnHeader5 this.columnHeader5.Text =; this.columnHeader5.Width = 81; / columnHeader6 this.columnHeader6.Text =; this.columnHeader6.Width = 76; / FormSearch this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows

29、.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(531, 240); this.Controls.Add(this.listViewView); this.Controls.Add(this.groupBoxSearch); this.Name = FormSearch; this.Text =; this.Load += new System.EventHandler(this.FormSearch_Load); this.groupBoxSearch.ResumeLayout(false); this

30、.groupBoxSearch.PerformLayout(); this.ResumeLayout(false); #endregion private System.Windows.Forms.GroupBox groupBoxSearch; private System.Windows.Forms.Button buttonClear; private System.Windows.Forms.Button buttonSearch; private System.Windows.Forms.TextBox textBoxSearch; private System.Windows.Fo

31、rms.RadioButton radioButtonNumberSearch; private System.Windows.Forms.RadioButton radioButtonNameSearch; private System.Windows.Forms.ListView listViewView; private System.Windows.Forms.ColumnHeader columnHeader1; private System.Windows.Forms.ColumnHeader columnHeader2; private System.Windows.Forms.

32、ColumnHeader columnHeader3; private System.Windows.Forms.ColumnHeader columnHeader4; private System.Windows.Forms.ColumnHeader columnHeader5; private System.Windows.Forms.ColumnHeader columnHeader6; FormAdd : Form OleDbConnection con; FormAdd() InitializeComponent(); FormAdd_Load( sender, EventArgs

33、e) buttonOk_Click( sender, EventArgs e) (getCon() MessageBox.Show(, MessageBoxButtons.OK); buttonClear_Click(sender, e); MessageBox.Show( MessageBoxButtons.OK); buttonClear_Click( sender, EventArgs e) textBoxName.Text = ; textBoxNum.Text = ; textBoxAutoNum.Text = ; textBoxAddress.Text = ; textBoxSer

34、vice.Text = ; textBoxMenu.Text = ; Boolean getCon() ConStr = Provider=Microsoft.Jet.OLEDB.4.0;Data source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = OleDbConnection(ConStr); sql = insert into tbUserInfo (userName,userNum,userAutoNum,userAddress,userService,userMenu) values ( + t

35、extBoxName.Text + , + textBoxNum.Text + , + textBoxAutoNum.Text + , + textBoxAddress.Text + , + textBoxService.Text + , + textBoxMenu.Text + ); OleDbCommand cmd = OleDbCommand(sql, con); con.Open(); cmd.ExecuteNonQuery(); FormUpdate : Form id = ; OleDbConnection con; OleDbDataReader tbread; FormUpda

36、te() InitializeComponent(); FormUpdate_Load( sender, EventArgs e) buttonSearch_Click( sender, EventArgs e) getCon(); tbread.Read(); id = tbread.GetValue(0).ToString(); textBoxName.Text = tbread.GetValue(1).ToString(); textBoxNum.Text = tbread.GetValue(2).ToString(); textBoxAutoNum.Text = tbread.GetV

37、alue(3).ToString(); textBoxAddress.Text = tbread.GetValue(4).ToString(); textBoxService.Text = tbread.GetValue(5).ToString(); textBoxMenu.Text = tbread.GetValue(6).ToString(); buttonClear_Click(sender, e); MessageBox.Show(MessageBoxButtons.OK); con.Close(); textBoxSearch.Text = ; buttonOk_Click( sen

38、der, EventArgs e) (update() MessageBox.Show(MessageBoxButtons.OK); buttonClearUser_Click(sender, e); MessageBox.Show(MessageBoxButtons.OK); con.Close(); buttonClearUser_Click( sender, EventArgs e) textBoxName.Text = ; textBoxNum.Text = ; textBoxAutoNum.Text = ; textBoxAddress.Text = ; textBoxService

39、.Text = ; textBoxMenu.Text = ; Boolean update() ConStr = Provider=Microsoft.Jet.OLEDB.4.0;Data source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = OleDbConnection(ConStr); sql = update tbUserInfo set userName = + textBoxName.Text + ,userNum = + textBoxNum.Text + ,userAutoNum = + t

40、extBoxAutoNum.Text + ,userAddress = + textBoxAddress.Text + ,userService = + textBoxService.Text + ,userMenu = + textBoxMenu.Text + where id = + .Parse(id); OleDbCommand cmd = OleDbCommand(sql, con); con.Open(); cmd.ExecuteNonQuery(); OleDbDataReader getCon() ConStr = Provider=Microsoft.Jet.OLEDB.4.

41、0;Data source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = OleDbConnection(ConStr); sql = select * from tbUserInfo where userNum = + textBoxSearch.Text + ; OleDbCommand cmd = OleDbCommand(sql, con); con.Open(); tbread = cmd.ExecuteReader(); tbread; MessageBox.Show(MessageBoxButton

42、s.OK); FormDelete : Form id = ; OleDbConnection con; OleDbDataReader tbread; FormDelete() InitializeComponent(); FormDelete_Load( sender, EventArgs e) buttonSearch_Click( sender, EventArgs e) getCon(); tbread.Read(); id = tbread.GetValue(0).ToString(); textBoxName.Text = tbread.GetValue(1).ToString(

43、); textBoxNum.Text = tbread.GetValue(2).ToString(); textBoxAutoNum.Text = tbread.GetValue(3).ToString(); textBoxAddress.Text = tbread.GetValue(4).ToString(); textBoxService.Text = tbread.GetValue(5).ToString(); textBoxMenu.Text = tbread.GetValue(6).ToString(); buttonClear_Click(sender, e); MessageBo

44、x.Show(MessageBoxButtons.OK); con.Close(); buttonClear_Click( sender, EventArgs e) textBoxSearch.Text = ; buttonDelete_Click( sender, EventArgs e) (delete() MessageBox.Show(MessageBoxButtons.OK); textBoxName.Text = ; textBoxNum.Text = ; textBoxAutoNum.Text = ; textBoxAddress.Text = ; textBoxService.

45、Text = ; textBoxMenu.Text = ; MessageBox.Show(MessageBoxButtons.OK); con.Close(); buttonCancel_Click( sender, EventArgs e) .Close(); Boolean delete() ConStr = Provider=Microsoft.Jet.OLEDB.4.0;Data source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = OleDbConnection(ConStr); sql = d

46、elete from tbUserInfo where ID = + .Parse(id); OleDbCommand cmd = OleDbCommand(sql, con); con.Open(); cmd.ExecuteNonQuery(); OleDbDataReader getCon() ConStr = Provider=Microsoft.Jet.OLEDB.4.0;Data source=Provider=Microsoft.Jet.OLEDB.4.0;Data Source=dbJJCRM.mdb; con = OleDbConnection(ConStr); sql = s

47、elect * from tbUserInfo where userNum = + textBoxSearch.Text + ; OleDbCommand cmd = OleDbCommand(sql, con); con.Open(); tbread = cmd.ExecuteReader(); tbread; MessageBox.Show(MessageBoxButtons.OK); AboutBox1 : Form AboutBox1() InitializeComponent(); .Text = String.Format(0 0, AssemblyTitle); .labelPr

48、oductName.Text = AssemblyProduct; .labelVersion.Text = String.Format(0 0, AssemblyVersion); .labelCopyright.Text = AssemblyCopyright; .labelCompanyName.Text = AssemblyCompany; .textBoxDescription.Text = AssemblyDescription; AssemblyTitle attributes = Assembly.GetExecutingAssembly().GetCustomAttribut

49、es(AssemblyTitleAttribute), ); (attributes.Length 0) AssemblyTitleAttribute titleAttribute = (AssemblyTitleAttribute)attributes0; (titleAttribute.Title != ) titleAttribute.Title; System.IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase); AssemblyVersion Assembly.GetExecuti

50、ngAssembly().GetName().Version.ToString(); AssemblyDescription attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(AssemblyDescriptionAttribute), ); (attributes.Length = 0) (AssemblyDescriptionAttribute)attributes0).Description; AssemblyProduct attributes = Assembly.GetExecutingAssembly

51、().GetCustomAttributes(AssemblyProductAttribute), ); (attributes.Length = 0) (AssemblyProductAttribute)attributes0).Product; AssemblyCopyright attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(AssemblyCopyrightAttribute), ); (attributes.Length = 0) (AssemblyCopyrightAttribute)attribut

52、es0).Copyright; AssemblyCompany attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(AssemblyCompanyAttribute), ); (attributes.Length = 0) (AssemblyCompanyAttribute)attributes0).Company; AboutBox1_Load( sender, EventArgs e) button3_Click( sender, EventArgs e) Form1 form1 = Form1(); form1

53、.ShowDialog(); public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Showinfo(); private void Showinfo() IShequ shequ = new Shequ(); DataSet ds = shequ.DsGetinfo(SELECT * FROM Baoxiu ORDER BY Repairdate DESC); GridView1.DataSource = ds.Tablesaa.Defau

54、ltView; GridView1.DataBind(); protected void GridView_PageIndexChaing(object sender, GridViewPageEventArgs e) GridView1.PageIndex = e.NewPageIndex; Showinfo(); protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) using System;using System.Configuration;using System.Data;using Sy

55、stem.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebControls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class _Default : System.Web.UI.Page protected void Page_

56、Load(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e) string nickname = txtNickname.Text.ToString(); string neirong = txtNeirong.Text.ToString(); if (nickname.Length 1 | neirong.Length 1) return; Insertinfo(nickname, neirong); txtNeirong.Text = ; private void Inse

57、rtinfo(string sNickname, string sNeirong) IShequ shequ = new Shequ(); shequ.Executeinfo(INSERT INTO Liaotian(Nickname,Neirong,Createdate) VALUES( + sNickname + , + sNeirong + ,GetDate(); private void Deleteinfo() protected void Button2_Click(object sender, EventArgs e) IShequ shequ = new Shequ(); sh

58、equ.Executeinfo(DELETE Liaotian); Response.Redirect(Default.aspx); using System;using System.Configuration;using System.Data;using System.Linq;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.HtmlControls;using System.Web.UI.WebControls;using System.Web.UI.WebContro

59、ls.WebParts;using System.Xml.Linq;using System.Data.SqlClient;public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) Showinfo(); private void Showinfo() IShequ shequ = new Shequ(); DataSet ds = shequ.DsGetinfo(SELECT * FROM Tingche ORDER BY Shiyongdat

60、e DESC); GridView1.DataSource = ds.Tablesaa.DefaultView; GridView1.DataBind(); protected void GridView_PageIndexChaing(object sender, GridViewPageEventArgs e) GridView1.PageIndex = e.NewPageIndex; Showinfo(); protected void GridView1_SelectedIndexChanged(object sender, EventArgs e) using System;usin

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論