個人信息管理系統(tǒng)數(shù)據(jù)庫設(shè)計_第1頁
個人信息管理系統(tǒng)數(shù)據(jù)庫設(shè)計_第2頁
個人信息管理系統(tǒng)數(shù)據(jù)庫設(shè)計_第3頁
個人信息管理系統(tǒng)數(shù)據(jù)庫設(shè)計_第4頁
個人信息管理系統(tǒng)數(shù)據(jù)庫設(shè)計_第5頁
已閱讀5頁,還剩15頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

#三、功能模塊圖:E_R圖:三、功能模塊圖:E_R圖:四、數(shù)據(jù)庫實施階段數(shù)據(jù)庫的完整性和安全性設(shè)計,根據(jù)業(yè)務(wù)規(guī)則設(shè)計的觸發(fā)器、存儲過程。

用戶表dbperson列名業(yè)L卜口、上仝數(shù)據(jù)類型取值約束索引否主鍵外鍵可否為空說明namevachar(50)Clustered主鍵notnull用戶名pwdnchar(10)notnull密碼p_namenchar(10)notnull用戶真名p_favournchar(50)notnull愛好p_mottonchar(50)notnull座右銘vipintnull是否為VIP行程表dbxingcheng列名數(shù)據(jù)類型取值約束索引否主鍵/外鍵可否為空說明idint自增Clustered主鍵notnull編號xingchengvarchar(max)notnull行程名字datedatetime日期格式notnull行程時間beizhuvarchar(max)notnull行程備注pnamevarchar(50)外鍵notnull用戶名通訊錄表dbphonebook列名業(yè)匚>LZ.-n^rf數(shù)據(jù)類型取值約束索引否主鍵外鍵可否為空說明idint自增Clustered主鍵notnull編號namentextnotnull好友姓名phonenchar(14)notnull聯(lián)系方式1phone2nchar(14)null聯(lián)系方式2addressnchar(20)null好友地址pnamevarchar(50)外鍵notnull用戶姓名財務(wù)表db.account列名數(shù)據(jù)類型取值約束索引否主鍵外鍵可否為空說明idint自增Clustered主鍵notnull編號accountnchar(10)notnull賬戶名sumfloatnotnull所用資金數(shù)inoutnchar(10)notnull進或出remarksnchar(10)null備注pnamevarchar(50)notnull用戶姓名五、詳細設(shè)計1、登錄模塊界面關(guān)鍵代碼:privatevoidenter_Click(objectsender,EventArgse){if(string.Empty!=username.Text.Trim()){Classisql_forml=newClassl();sql_forml.SelectDs("select*fromtb_personwherename—"+username.Text.Trim()+"'","aa");if(string.Compare(sql_form1.ds.Tables["aa"].Rows[0][0].ToString().Trim(),username.Text.Trim())==O&&(sql_form1.ds.Tables["aa"].Rows[0][1].ToString().Trim()==password.Text.Trim())){this.Hide();Form2Form2=newForm2();Form2.str_form2=username.Text.Trim();Form2.Show();}else{MessageBox.ShowC用戶名或密碼錯誤!","錯誤提示”);password.Clear();}}}2、主界面:

3、個人備忘錄:關(guān)鍵代碼:Classiselectl=newClassl();SqlCommandcomm5;comm5=select1.Select("*","tb_xingcheng","date>=getdate()andpname='"+str_form2+""');SqlDataReaderdr1=comm5.ExecuteReader();if(dr1!=null)dr1.Read();listBoxl.Items.Add(”行程:"+drl[l].ToString());listBoxl.Items.Add("日期:"+dr1[2].ToString());listBox1.Items.Add(”備注:"+dr1[3].ToString());}dr1.Close();select1.con_close();listView3.Columns[0].Width=0;Stringconnstr="DataSource=(local);InitialCatalog=db_keshe;IntegratedSecurity=True";SqlConnectionconn=newSqlConnection(connstr);conn.Open();SqlCommandcomm4=newSqlCommand("selectidfromtb_xingchengwherepname='"+str_form2+"'",conn);SqlDataReaderdr=comm4.ExecuteReader();if(dr!=null){while(dr.Read()){listView3.Items.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm=newSqlCommand("selectxingchengfromtb_xingchengwherepname='"+str_form2+"'",conn);dr=comm.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView3.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm2=newSqlCommand("selectdatefromtb_xingchengwherepname='"+str_form2+"'",conn);dr=comm2.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView3.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm3=newSqlCommand("selectbeizhufromtb_xingchengwherepname='"+str_form2+"'",conn);dr=comm3.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView3.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();conn.Close();4、行程的添加界面:關(guān)鍵代碼:privatevoidbuttonl_Click(objectsender,EventArgse){stringxingcheng=textBox1.Text.Trim();stringtime=textBox2.Text.Trim();stringremark=textBox3.Text.Trim();Classiinsert=newClassl();if(string.Empty!=textBox1.Text.Trim()){if(insert.Insert("tb_xingcheng",xingcheng,time,remark,str_form3)==1){MessageBox.Show(”添加成功!","提示”);textBox1.Clear();textBox2.Clear();textBox3.Clear();this.Close();}}else{MessageBox.Show('請輸入行程內(nèi)容!","提示”);}}5、通訊錄界面:關(guān)鍵代碼:listView4.Columns[0].Width=0;inti=0;Classlselect=newClass1();SqlCommandcomm1;comm1=select.Select("id","tb_phonebook","pname='"+str_form2+"'");SqlDataReaderdr;

dr=comm1.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView4.Items.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm2;comm2=select.Select("name","tb_phonebook","pname='"+str_form2+"'");dr=comm2.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView4.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm3;!!!!!);comm3=select.Select("phone","tb_phonebook","pname='"+str_form2+dr=comm3.ExecuteReader();!!!!!);if(dr!=null){i=0;while(dr.Read()){listView4.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm4;comm4=select.Select("phone2","tb_phonebook","pname='"+str_form2+!!!!!);!!!!!);dr=comm4.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView4.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();SqlCommandcomm5;comm5=select.Select("address","tb_phonebook","pname='"+str_form2+"'");dr=comm5.ExecuteReader();if(dr!=null){i=0;while(dr.Read()){listView4.Items[i++].SubItems.Add(dr[0].ToString());}}dr.Close();select.con_close();6、通訊錄添加界面關(guān)鍵代碼:if(string.Empty!=textBoxl.Text.Trim()&&buttonl.Text==添加"){stringstr1=textBox1.Text.Trim();stringstr2=textBox2.Text.Trim();

stringstr3=textBox3.Text.Trim();stringstr4=textBox4.Text.Trim();Classiinsert=newClass1();if(1==insert.Insert("insertintotb_phonebook(name,phone,phone2,address,pname)values。"+strl+"',”'+str2+"',”'+str3+"',”'+str4+"',”'+str_form4+"')")){MessageBox.Show(”添加成功!","提示”);insert.con_close();this.Close();}else{MessageBox.Show(”添加失?。?,"提示”);}}7、個人理財界面:a?Fcrm2個人備忘錄I個人遹訊錄『個入理財[倍息管理<if5555<if5555蠱Bo爲(wèi)謖金支出賬戶名稱金額資金猛向備注餞包…烈敦滅曲于atkf...433fada刪除悔改關(guān)鍵代碼:intsum=0;intsum2=0;listView2.Columns[0].Width=0;if(1==sql.SelectDs("select*fromtb_accountwherepname='"+str_form2+""',"tb_account")){listView2.Items.Clear();for(inti=0;i<sql.ds.Tables[0].Rows.Count;i++){listView2.Items.Add(sql.ds.Tables["tb_account"].Rows[i][0].ToString());listView2.Items[i].SubItems.Add(sql.ds.Tables["tb_account"].Rows[i][1].ToString());listView2.Items[i].SubItems.Add(sql.ds.Tables["tb_account"].Rows[i][2].ToString());listView2.Items[i].SubItems.Add(sql.ds.Tables["tb_account"].Rows[i][3].ToString());listView2.Items[i].SubItems.Add(sql.ds.Tables["tb_account"].Rows[i][4].ToString());if((int)(sql.ds.Tables[0].Rows[i][2])>0){sum=sum+(int)(sql.ds.Tables["tb_account"].Rows[i][2]);}else{sum2=sum2+(int)(sql.ds.Tables["tb_account"].Rows[i][2]);}}listView1.Items[0].SubItems.Add(sum.ToString());listView1.Items[1].SubItems.Add(sum2.ToString());sum=sum+sum2;listView1.Items[2].SubItems.Add(sum.ToString());}else{MessageBox.Show(”導(dǎo)入數(shù)據(jù)出錯",”提示”);}7、增加賬戶信息:關(guān)鍵代碼:if("添加"==buttonl.Text&&string.Empty!=textBoxl.Text.Trim()){str[1]=textBox1.Text.Trim();str[2]=textBox2.Text.Trim();str[3]=textBox3.Text.Trim();str[4]=textBox4.Text.Trim();if(1==sql_form5.Insert("insertintotb_account(account,sum,inout,remarks,pname)values。"+str[1]+"','"+str[2]+"','"+str[3]+"','"+str[4]+"','"+str_form5+"')")){this.Close();MessageBox.Show(“添加成功","提示");}else{MessageBox.Show(”添加失敗","提示”);}}8、個人信息管理:關(guān)鍵代碼:privatevoidbuttonl_Click(objectsender,EventArgse){if(string.Compare(button1.Text,"修改個人信息")==0){button1.Text="修改完成";textBox5.Enabled=true;textBox6.Enabled=true;textBox4.Enabled=true;}else{button1.Text="修改個人信息";sql.Update("updatetb_personsetp_name='"+textBox5.Text.Trim()+"',p_motto='"+textBox4.Text.Trim()+"',p_favour="'+textBox6.Text.Trim()+"'wherename='"+str_form2+"'");textBox5.Enabled=false;textBox6.Enabled=false;textBox4.Enabled=false;}}六

溫馨提示

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

評論

0/150

提交評論