项目作者: Nano-Labs-Developers

项目描述 :
SQL C# simple application [ Testing ]
高级语言: C#
项目地址: git://github.com/Nano-Labs-Developers/Link-Manager.git
创建时间: 2020-04-29T15:26:01Z
项目社区:https://github.com/Nano-Labs-Developers/Link-Manager

开源协议:MIT License

下载


DB-DATA

Application Details

Codacy Badge

About this application

  • Using C# and SQL database
  • Simple login applied
  • For Student
SQL Connection
  1. SqlConnection con = new SqlConnection(@"Data Source = <here user_name[PC_name]>; Initial Catalog = StudentDB; Integrated Security = True");

Ex:

  1. SqlConnection con = new SqlConnection(@"Data Source = ASUS; Initial Catalog = StudentDB; Integrated Security = True");
Database Deatils
Database - Select Data
  1. string query_search = "SELECT * FROM Teacher WHERE email = '" + u_email + "'";
Database - Insert Data
  1. string query_insert = "INSERT INTO FormLoginData VALUES('" + user_name+ "','" +password+ "','" +role+ "','"+ usertype + "')";
Database - Update Data
  1. string updatesql = "UPDATE Student SET firstname='" + fname + "',email='" + email + "',tp='" + tel + "',gender='" + gender + "',grade='" + grade + "' where email='" + email + "'";
Database - Delete Data
  1. string deletesql = "DELETE FROM Teacher WHERE email='" + email + "'";
Form Movement Handle
Example Only
  1. [DllImport("user32.DLL", EntryPoint = "ReleaseCapture")]
  2. private extern static void ReleaseCapture();
  3. [DllImport("user32.DLL", EntryPoint = "SendMessage")]
  4. private extern static void SendMessage(System.IntPtr hwnd, int wmsg, int wparam, int lparam);
  5. private void Headerpanel_MouseDown(object sender, MouseEventArgs e)
  6. {
  7. ReleaseCapture();
  8. SendMessage(this.Handle,0x112,0xf012,0);
  9. }

Github Pages