Modul C# Database SQL, Connection,manipulasi data dan Report 1. Rancanglah Database pada Sql Server dengan field seperti dibawah ini. 2. Rancanglah tampilan interface pada lingkungan windows C# .Net seperti dibawah ini sesuai dengan database yang anda buat…
4
Embed
Modul C# Database SQL, Connection,manipulasi data dan … · Modul C# Database SQL, Connection,manipulasi data dan Report 1. Rancanglah Database pada Sql Server dengan field seperti
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Modul C#
Database SQL, Connection,manipulasi data dan Report
1. Rancanglah Database pada Sql Server dengan field seperti dibawah ini.
2. Rancanglah tampilan interface pada lingkungan windows C# .Net seperti dibawah ini
sesuai dengan database yang anda buat…
Listing Program
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.SqlClient; namespace lat_c_shap { public partial class Form1 : Form { public SqlConnection con1; public SqlCommand com1, com2; public SqlDataAdapter adp1; public DataSet ds1; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { // TODO: This line of code loads data into the 'ds1.tbmhs' table. You can move, or remove it, as needed. this.tbmhsTableAdapter1.Fill(this.ds1.tbmhs); string cstr; cstr = "Data Source=ZEBAOTH-779C970;Initial Catalog=pop;Integrated Security=True"; con1 = new SqlConnection(cste); con1.Open(); com1 = new SqlCommand(); com1.Connection = con1; com1.CommandType = CommandType.Text; ds1 = new DataSet(); adp1 = new SqlDataAdapter(com1); adp1.Fill(ds1, "tbmhs"); dg1.DataSource = ds1; dg1.DataMember = "tbmhs"; con1.Close(); } private void BtnClear_Click(object sender, EventArgs e)