91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 69KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-06-04
  • 語言: C#
  • 標簽: C#??登錄??

資源簡介

簡單 適合初學者 數據庫連接部分 SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=chaoshi;Integrated Security=True"); con.Open(); String sql = "select * from [User]"; SqlCommand comm = new SqlCommand(sql, con); SqlDataReader read = comm.ExecuteReader();

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.ComponentModel;
using?System.Data;
using?System.Drawing;
using?System.Linq;
using?System.Text;
using?System.Windows.Forms;
using?System.Data?;
using?System.Data.SqlClient?;

namespace?WindowsFormsApplication1
{
????public?partial?class?Form1?:?Form
????{
????????public?Form1()
????????{
????????????InitializeComponent();
????????}

????????private?void?panel_OK_Paint(object?sender?PaintEventArgs?e)
????????{


????????}

????????private?void?panel_Cancel_Paint(object?sender?PaintEventArgs?e)
????????{
???????????
????????}

????????private?void?button1_Click(object?sender?EventArgs?e)
????????{
????????????if?(textBox_Name.Text?==?““?||?textBox_Pass.Text?==?““)
????????????{
????????????????MessageBox.Show(“請將登錄信息填寫完整。“?“提示“?MessageBoxButtons.OK?MessageBoxIcon.Information);
????????????}
????????????else
????????????{
????????????????string?name?=?textBox_Name.Text;
????????????????string?pass?=?textBox_Pass.Text;
????????????????SqlConnection?con?=?new?SqlConnection(“Data?Source=.;Initial?Catalog=chaoshi;Integrated?Security=True“);
????????????????con.Open();
????????????????String?sql?=?“select?*?from?[User]“;
????????????????SqlCommand?comm?=?new?SqlCommand(sql?con);
????????????????SqlDataReader?read?=?comm.ExecuteReader();
????????????????while?(read.Read())
????????????????{
????????????????????int?n?=?0;
????????????????????if?((read[0].ToString().Trim()?==?name)?&&?(read[1].ToString().Trim()?==?pass))//Trim()函數是將字符串開頭和結尾的空格去除
????????????????????{
????????????????????????//DialogResult?=?DialogResult.OK;
????????????????????????//this.Close();
????????????????????????main?frm2?=?new?main();
????????????????????????frm2.ShowDialog();
????????????????????????n?=?1;
????????????????????????break;
????????????????????}

??????????????????if(n==0)

????????????????MessageBox.Show(“對不起,您的用戶名/密碼不正確,請重新輸入“);

????????????????}
????????????????
????????????}
????????}

????????private?void?button2_Click(object?sender?EventArgs?e)
????????{
????????????this.Close();
????????}
????}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????22016??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.exe

?????文件??????30208??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.pdb

?????文件??????11600??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe

?????文件????????490??2010-03-17?22:39??cdenglu\WindowsFormsApplication1\bin\Debug\WindowsFormsApplication1.vshost.exe.manifest

?????文件???????2261??2011-06-15?10:00??cdenglu\WindowsFormsApplication1\Form1.cs

?????文件???????6666??2011-06-15?09:54??cdenglu\WindowsFormsApplication1\Form1.Designer.cs

?????文件??????21453??2011-06-15?09:54??cdenglu\WindowsFormsApplication1\Form1.resx

?????文件????????372??2011-06-15?09:43??cdenglu\WindowsFormsApplication1\main.cs

?????文件???????1182??2011-06-15?09:43??cdenglu\WindowsFormsApplication1\main.Designer.cs

?????文件???????2152??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6365??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件????????492??2011-06-15?09:54??cdenglu\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.read.1.tlog

?????文件???????1552??2011-06-15?09:54??cdenglu\WindowsFormsApplication1\obj\x86\Debug\GenerateResource.write.1.tlog

?????文件???????1231??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.csproj.FileListAbsolute.txt

?????文件??????22016??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.exe

?????文件??????10721??2011-06-15?09:54??cdenglu\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Form1.resources

?????文件??????30208??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.pdb

?????文件????????180??2011-06-15?09:44??cdenglu\WindowsFormsApplication1\obj\x86\Debug\WindowsFormsApplication1.Properties.Resources.resources

?????文件????????505??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\Program.cs

?????文件???????1404??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\Properties\AssemblyInfo.cs

?????文件???????2898??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\Properties\Resources.Designer.cs

?????文件???????5612??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\Properties\Resources.resx

?????文件???????1109??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\Properties\Settings.Designer.cs

?????文件????????249??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\Properties\Settings.settings

?????文件???????3891??2011-06-15?09:44??cdenglu\WindowsFormsApplication1\WindowsFormsApplication1.csproj

?????文件????????914??2011-06-15?09:37??cdenglu\WindowsFormsApplication1.sln

????..A..H.?????20480??2011-06-15?10:00??cdenglu\WindowsFormsApplication1.suo

?????目錄??????????0??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\obj\x86\Debug\TempPE

?????目錄??????????0??2011-06-15?09:58??cdenglu\WindowsFormsApplication1\obj\x86\Debug

?????目錄??????????0??2011-06-15?09:37??cdenglu\WindowsFormsApplication1\bin\Debug

............此處省略9個文件信息

評論

共有 條評論