企业客户信息管理系统代码.docx

上传人:b****6 文档编号:4827530 上传时间:2022-12-10 格式:DOCX 页数:108 大小:33.27KB
下载 相关 举报
企业客户信息管理系统代码.docx_第1页
第1页 / 共108页
企业客户信息管理系统代码.docx_第2页
第2页 / 共108页
企业客户信息管理系统代码.docx_第3页
第3页 / 共108页
企业客户信息管理系统代码.docx_第4页
第4页 / 共108页
企业客户信息管理系统代码.docx_第5页
第5页 / 共108页
点击查看更多>>
下载资源
资源描述

企业客户信息管理系统代码.docx

《企业客户信息管理系统代码.docx》由会员分享,可在线阅读,更多相关《企业客户信息管理系统代码.docx(108页珍藏版)》请在冰豆网上搜索。

企业客户信息管理系统代码.docx

企业客户信息管理系统代码

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Windows.Forms;

namespaceCompanyPersonnelManagementSystem

{

staticclassProgram

{

[STAThread]

staticvoidMain()

{

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Loginlo=newLogin();

lo.ShowDialog();

if(lo.DialogResult==DialogResult.OK)

{

Form

{

//privateboolres=false;

OleDbConnectioncon;

OleDbDataReadertbread;

FormLogin()

{

InitializeComponent();

}

buttonClose_Click(sender,EventArgse)

{

Application.Exit();

}

buttonOk_Click(sender,EventArgse)

{

getCon();

{

tbread.Read();

pw=tbread.GetValue(0).ToString();

(pw==textBoxPW.Text)

{

ClassAdminName.adminName=textBoxName.Text;

.Close();

}

MessageBox.Show(MessageBoxButtons.OK);

}

{

MessageBox.Show(MessageBoxButtons.OK);

}

con.Close();

}

OleDbDataReadergetCon()

{

{

ConStr="Provider=Microsoft.Jet.OLEDB.4.0;Datasource=Provider=Microsoft.Jet.OLEDB.4.0;DataSource=dbJJCRM.mdb";

con=OleDbConnection(ConStr);

sql="selectadminPasswordfromtbAdminwhereadminName='"+textBoxName.Text+"'";

OleDbCommandcmd=OleDbCommand(sql,con);

con.Open();

tbread=cmd.ExecuteReader();

tbread;

}

{

MessageBox.Show(MessageBoxButtons.OK);

}

}

}

publicpartialclassFormView:

Form

{

privateOleDbConnectioncon;

privateOleDbDataReadertbread;

//introw=0;

publicFormView()

{

InitializeComponent();

}

privatevoidFormView_Load(objectsender,EventArgse)

{

getCon();

listViewViewAll.Items.Clear();

try

{

while(tbread.Read())

{

ListViewItemlvi=newListViewItem(tbread.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);

}

}

catch

{

MessageBox.Show(MessageBoxButtons.OK);

}

con.Close();

}

publicOleDbDataReadergetCon()

{

try

{

stringConStr="Provider=Microsoft.Jet.OLEDB.4.0;Datasource=Provider=Microsoft.Jet.OLEDB.4.0;DataSource=dbJJCRM.mdb";

con=newOleDbConnection(ConStr);

stringsql="select*fromtbUserInfo";

OleDbCommandcmd=newOleDbCommand(sql,con);

con.Open();

tbread=cmd.ExecuteReader();

returntbread;

}

catch

{

MessageBox.Show(MessageBoxButtons.OK);

returnnull;

}

}

}

FormMain:

Form

{

FormMain()

{

InitializeComponent();

.Hide();

FormLoginfl=FormLogin();

fl.ShowDialog();

}

FormMain_Load(sender,EventArgse)

{

labelWelcom.Text=+ClassAdminName.adminName;

}

buttonViewAll_Click(sender,EventArgse)

{

FormViewfv=FormView();

fv.MdiParent=;

fv.Show();

}

buttonSearch_Click(sender,EventArgse)

{

FormSearchfs=FormSearch();

fs.MdiParent=;

fs.Show();

}

buttonAdd_Click(sender,EventArgse)

{

FormAddfa=FormAdd();

fa.MdiParent=;

fa.Show();

}

buttonUpdate_Click(sender,EventArgse)

{

FormUpdatefu=FormUpdate();

fu.MdiParent=;

fu.Show();

}

buttonExit_Click(sender,EventArgse)

{

Application.Exit();

}

buttonDelete_Click(sender,EventArgse)

{

FormDeletefd=FormDelete();

fd.MdiParent=;

fd.Show();

}

button1_Click(sender,EventArgse)

{

AboutBox1aboutbox=AboutBox1();

aboutbox.ShowDialog();

}

button2_Click(sender,EventArgse)

{

System.Diagnostics.Process.Start("notepad.exe");

}

button3_Click(sender,EventArgse)

{

Form1form1=Form1();

form1.ShowDialog();

}

}

partialclassFormSearch

{

///

///Requireddesignervariable.

///

privateSystem.ComponentModel.IContainercomponents=null;

///

///Cleanupanyresourcesbeingused.

///

///trueifmanagedresourcesshouldbedisposed;otherwise,false.

protectedoverridevoidDispose(booldisposing)

{

if(disposing&&(components!

=null))

{

components.Dispose();

}

base.Dispose(disposing);

}

#regionWindowsFormDesignergeneratedcode

///

///RequiredmethodforDesignersupport-donotmodify

///thecontentsofthismethodwiththecodeeditor.

///

privatevoidInitializeComponent()

{

this.groupBoxSearch=newSystem.Windows.Forms.GroupBox();

this.buttonClear=newSystem.Windows.Forms.Button();

this.buttonSearch=newSystem.Windows.Forms.Button();

this.textBoxSearch=newSystem.Windows.Forms.TextBox();

this.radioButtonNumberSearch=newSystem.Windows.Forms.RadioButton();

this.radioButtonNameSearch=newSystem.Windows.Forms.RadioButton();

this.listViewView=newSystem.Windows.Forms.ListView();

this.columnHeader1=newSystem.Windows.Forms.ColumnHeader();

this.columnHeader2=newSystem.Windows.Forms.ColumnHeader();

this.columnHeader3=newSystem.Windows.Forms.ColumnHeader();

this.columnHeader4=newSystem.Windows.Forms.ColumnHeader();

this.columnHeader5=newSystem.Windows.Forms.ColumnHeader();

this.columnHeader6=newSystem.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.textBoxSearch);

this.groupBoxSearch.Controls.Add(this.radioButtonNumberSearch);

this.groupBoxSearch.Controls.Add(this.radioButtonNameSearch);

this.groupBoxSearch.Dock=System.Windows.Forms.DockStyle.Top;

this.groupBoxSearch.Location=newSystem.Drawing.Point(0,0);

this.groupBoxSearch.Name="groupBoxSearch";

this.groupBoxSearch.Size=newSystem.Drawing.Size(531,107);

this.groupBoxSearch.TabIndex=1;

this.groupBoxSearch.TabStop=false;

this.groupBoxSearch.Text=;

this.groupBoxSearch.Enter+=newSystem.EventHandler(this.groupBoxSearch_Enter);

//buttonClear

this.buttonClear.Location=newSystem.Drawing.Point(402,58);

this.buttonClear.Name="buttonClear";

this.buttonClear.Size=newSystem.Drawing.Size(75,23);

this.buttonClear.TabIndex=4;

this.buttonClear.Text=;

this.buttonClear.UseVisualStyleBackColor=true;

this.buttonClear.Click+=newSystem.EventHandler(this.buttonClear_Click);

//buttonSearch

this.buttonSearch.Location=newSystem.Drawing.Point(402,30);

this.buttonSearch.Name="buttonSearch";

this.buttonSearch.Size=newSystem.Drawing.Size(75,23);

this.buttonSearch.TabIndex=3;

this.buttonSearch.Text=;

this.buttonSearch.UseVisualStyleBackColor=true;

this.buttonSearch.Click+=newSystem.EventHandler(this.buttonSearch_Click);

//textBoxSearch

this.textBoxSearch.Location=newSystem.Drawing.Point(171,46);

this.textBoxSearch.Name="textBoxSearch";

this.textBoxSearch.Size=newSystem.Drawing.Size(195,21);

this.textBoxSearch.TabIndex=2;

//radioButtonNumberSearch

this.radioButtonNumberSearch.AutoSize=true;

this.radioButtonNumberSearch.Location=newSystem.Drawing.Point(47,65);

this.radioButtonNumberSearch.Name="radioButtonNumberSearch";

this.radioButtonNumberSearch.Size=newSystem.Drawing.Size(107,16);

this.radioButtonNumberSearch.TabIndex=1;

this.radioButtonNumberSearch.TabStop=true;

this.radioButtonNumberSearch.Text=;

this.radioButtonNumberSearch.UseVisualStyleBackColor=true;

//radioButtonNameSearch

this.radioButtonNameSearch.AutoSize=true;

this.radioButtonNameSearch.Location=newSystem.Drawing.Point(47,30);

this.radioButtonNameSearch.Name="radioButtonNameSearch";

this.radioButtonNameSearch.Size=newSystem.Drawing.Size(107,16);

this.radioButtonNameSearch.TabIndex=0;

this.radioButtonNameSearch.TabStop=true;

this.radioButtonNameSearch.Text=;

this.radioButtonNameSearch.UseVisualStyleBackColor=true;

//listViewView

this.listViewView.Columns.AddRange(newSystem.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.listViewView.GridLines=true;

this.listViewView.Location=newSystem.Drawing.Point(0,108);

this.listViewView.Name="listViewView";

this.listViewView.Size=newSystem.Drawing.Size(531,132);

this.listViewView.TabIndex=0;

this.listViewView.UseCompatibleStateImageBehavior=false;

this.listViewView.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.columnHeader4.Text=;

this.columnHeader4.Width=134;

//columnHeader5

this.columnHeader5.Text=;

this.columnHeader5.Width=81;

//columnHeader6

this.columnHeader6.Text=;

this.columnHeader6.Width=76;

//FormSearch

this.AutoScaleDimensions=newSystem.Drawing.SizeF(6F,12F);

this.AutoScaleMode=System.Windows.Forms.AutoScaleMode.Font;

this.ClientSize=newSystem.Drawing.Size(531,240);

this.Controls.Add(this.listViewView);

this.Controls.Add(this.groupBoxSearch);

this.Name="FormSearch";

this.Text=;

this.Load+=newSystem.EventHandler(this.FormSearch_Load);

this.groupBoxSearch.ResumeLayout(false);

this.groupBoxSearch.PerformLayout();

this.ResumeLayout(false);

}

#endregion

privateSystem.Windows.Forms.GroupBoxgroupBoxSearch;

privateSystem.Windows.Forms.ButtonbuttonClear;

privateSystem.Windows.Forms.ButtonbuttonSearch;

privateSystem.Windows.Forms.TextBoxtextBoxSearch;

privateSystem.Windows.Forms.RadioButtonradioButtonNumbe

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 工程科技 > 能源化工

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1