• Tidak ada hasil yang ditemukan

Implementasi Metode Simple Additive Weighting dan Weighted Product Model Dalam Pemilihan Lembaga Bimbingan Belajar di Kota Medan

N/A
N/A
Protected

Academic year: 2017

Membagikan "Implementasi Metode Simple Additive Weighting dan Weighted Product Model Dalam Pemilihan Lembaga Bimbingan Belajar di Kota Medan"

Copied!
25
0
0

Teks penuh

(1)

LAMPIRAN A : LISTING PROGRAM

1. Mainform

/*

* Created by SharpDevelop. * User: User7

* Date: 28/09/2015 * Time: 9:38

*

* To change this template use Tools | Options | Coding | Edit Standard Headers.

*/

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Windows.Forms;

namespace home1 {

/// <summary>

/// Description of MainForm.

/// </summary>

public partial class MainForm : Form {

public MainForm() {

//

// The InitializeComponent() call is required for Windows Forms designer support.

//

InitializeComponent();

//

// TODO: Add constructor code after the InitializeComponent() call.

//

}

void KRITERIALAHANToolStripMenuItemClick(object sender, Event Args e)

{

Form a=new databimbingan(); a.Show();

}

void DATALAHANToolStripMenuItemClick(object sender, EventArgs e)

(2)

Form b=new kriteriabobot(); b.Show();

}

void EXITToolStripMenuItemClick(object sender, EventArgs e) {

DialogResult button= MessageBox.Show("Are you sure want to EXIT?","EXIT",

MessageBoxButtons.Ye sNo,MessageBoxIcon.Question,

MessageBoxDefaultBut ton.Button2);

if(button==DialogResult.Yes) Application.Exit(); }

void ABOUTToolStripMenuItemClick(object sender, EventArgs e) {

Form c=new about(); c.Show();

}

void HOMEToolStripMenuItemClick(object sender, EventArgs e) {

}

void METODEToolStripMenuItemClick(object sender, EventArgs e) {

Form f=new metode(); f.Show();

}

void Label2Click(object sender, EventArgs e) {

}

void Label3Click(object sender, EventArgs e) {

}

void Label1Click(object sender, EventArgs e) {

}

(3)

}

void Label42Click(object sender, EventArgs e) {

} } }

2. About

/*

* Created by SharpDevelop. * User: User7

* Date: 28/09/2015 * Time: 10:09 *

* To change this template use Tools | Options | Coding | Edit Standard Headers.

*/

using System;

using System.Drawing;

using System.Windows.Forms;

namespace home1 {

/// <summary>

/// Description of about.

/// </summary>

public partial class about : Form {

public about() {

//

// The InitializeComponent() call is required for Windows Forms designer support.

//

InitializeComponent();

//

// TODO: Add constructor code after the InitializeComponent() call.

//

}

void AboutLoad(object sender, EventArgs e) {

(4)

void Label2Click(object sender, EventArgs e) {

}

void PictureBox2Click(object sender, EventArgs e) {

}

void Label3Click(object sender, EventArgs e) {

}

void Label1Click(object sender, EventArgs e) {

}

void Label4Click(object sender, EventArgs e) {

}

void Label6Click(object sender, EventArgs e) {

}

void Label8Click(object sender, EventArgs e) {

} } }

3.Metode

/*

* Created by SharpDevelop. * User: User7

* Date: 28/09/2015 * Time: 10:58 *

* To change this template use Tools | Options | Coding | Edit Standard Headers.

*/

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Windows.Forms;

(5)

using System.Data;

using System.Data.OleDb;

namespace home1 {

/// <summary>

/// Description of metode.

/// </summary>

public partial class metode : Form {

MySqlConnection koneksi2 =

new MySqlConnection("server=localhost;port=3306;username=root ;password=");

double maxc1,maxc2,maxc3,maxc4,minc5,minc6,minc7,minc8; double tertinggi=0;

string lahanterbaik,temp_pm; public metode()

{ //

// The InitializeComponent() call is required for Windows Forms designer support.

//

InitializeComponent();

//

// TODO: Add constructor code after the InitializeComponent() call.

//

}

void Panel2Paint(object sender, PaintEventArgs e) {

}

void Button1Click(object sender, EventArgs e) {

try {

DateTime waktuawal,waktuakhir;

waktuawal=DateTime.Now; double hc1,hc2,hc3,hc4,hc5,hc6,hc7,hc8; string MyConnection2

= "server=localhost;port=3306;username=root;password="; MySqlConnection MyConn2

= new MySqlConnection(MyConnection2);

//MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MyConn2.Open();

(6)

maxc1=Convert.ToDouble(command1.ExecuteScalar().ToStr ing());

MySqlCommand command2 = new MySqlCommand("select max(C2) from db_spk_bimbel.tb_bobot",MyConn2);

maxc2=Convert.ToDouble(command2.ExecuteScalar().ToStr ing());

MySqlCommand command3 = new MySqlCommand("select max(C3) from db_spk_bimbel.tb_bobot",MyConn2);

maxc3=Convert.ToDouble(command3.ExecuteScalar().ToStr ing());

//MessageBox.Show("min" + minc3.ToString());

MySqlCommand command4 = new MySqlCommand("select max(C4) from db_spk_bimbel.tb_bobot",MyConn2);

maxc4=Convert.ToDouble(command4.ExecuteScalar().ToStr ing());

MySqlCommand command5 = new MySqlCommand("select min(C5) from db_spk_bimbel.tb_bobot",MyConn2);

minc5=Convert.ToDouble(command5.ExecuteScalar().ToStr ing());

MySqlCommand kueri = new MySqlCommand("SELECT * FROM db_spk_bimbel.tb_bobot",MyConn2);

string temp;

//kueri.CommandText = qw;

//koneksi.Open();

MySqlDataReader dr;

dr = kueri.ExecuteReader();

while(dr.Read()) {

temp = dr["nama"].ToString(); //matriks normalisasi

hc1 = (Convert.ToDouble(dr["c1"]))/maxc1; hc2 = (Convert.ToDouble(dr["c2"]))/maxc2; hc3 = (Convert.ToDouble(dr["c3"]))/maxc3; hc4 = (Convert.ToDouble(dr["c4"]))/maxc4; hc5 = (Convert.ToDouble(dr["c5"]))/minc5;

//perkalian dengan w

//MessageBox.Show(hc1.ToString());

double skor

= (hc1*0.3)+(hc2*0.2)+(hc3*0.15)+(hc4*0.25)+(hc5*0.1);

(7)

updateskorsaw(temp,hc1,hc2,hc3,hc4,hc5,skor); }

//koneksi.Close();

MyConn2.Close();

waktuakhir=DateTime.Now;

TimeSpan lama =waktuakhir.Subtract(waktuawal); textBox1.Text=lama.TotalMilliseconds.ToString()+" MilliSeconds";

}

catch (Exception ex) {

MessageBox.Show(ex.Message); }

lihatperangkingan(); sawtinggi.Text=lahanterbaik; //datatertinggi_pm();

}

void lihatwpm(){ try{

string MyConnection2

= "server=localhost;port=3306;username=root;password="; //Display query

string Query = "select * from db_spk_bimbel.tb_wpm ORDER BY skor DESC;";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2

= new MySqlCommand(Query, MyConn2); MyConn2.Open();

//For offline connection we weill use MySqlDataAdapter class.

MySqlDataAdapter MyAdapter = new MySqlDataAdapter();

MyAdapter.SelectCommand = MyCommand2; //DataTable dTable = new DataTable();

DataTable dTable = new DataTable(); MyAdapter.Fill(dTable);

dataGridView1.DataSource = dTable; // here i have assign dTable object to the dataGridView1 object to display

data.

MyConn2.Close(); }

catch (Exception ex) {

MessageBox.Show(ex.Message); }

(8)

void lihatperangkingan() {

try{

string MyConnection2

= "server=localhost;port=3306;username=root;password="; //Display query

string Query = "select * from

db_spk_bimbel.tb_normalisasi_saw ORDER BY skor DESC;"; MySqlConnection MyConn2

= new MySqlConnection(MyConnection2); MySqlCommand MyCommand2

= new MySqlCommand(Query, MyConn2); MyConn2.Open();

//For offline connection we weill use MySqlDataAdapter class.

MySqlDataAdapter MyAdapter = new MySqlDataAdapter();

MyAdapter.SelectCommand = MyCommand2; //DataTable dTable = new DataTable();

DataTable dTable = new DataTable(); MyAdapter.Fill(dTable);

dataGridView4.DataSource = dTable; // here i have assign dTable object to the dataGridView1 object to display

data.

MyConn2.Close();

}catch(Exception){

MessageBox.Show("Ada Error"); }

}

void updateskorsaw(string nama,double hc1,double hc2,double h c3,double hc4,double hc5, double skor)

{ try{

string MyConnection2

= "datasource=localhost;port=3306;username=root;password="; string query2= "update

db_spk_bimbel.tb_normalisasi_saw set

normalisasi_c1='" + hc1+ "',normalisasi_c2='" +hc2+ "',normalisasi_c3 ='" +hc3+ "',normalisasi_c4='" + hc4+ "',normalisasi_c5='" + hc5+ "', skor='" + skor+ "' where nama='" + nama+ "';"; MySqlConnection MyConn2

= new MySqlConnection(MyConnection2);

//MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2);

(9)

//MyReader2 = MyCommand2.ExecuteReader(); // Here our query will be executed and data saved into the database.

MyReader2 = MyCommand3.ExecuteReader(); // MessageBox.Show("Save Data");

MyConn2.Close();

}catch(Exception){

MessageBox.Show("Ada Error"); }

}

void updateskorwpm(string nama,double hc1,double hc2,double h c3,double hc4,double hc5, String skor)

{ try{

string MyConnection2

= "datasource=localhost;port=3306;username=root;password=";

string query2= "update db_spk_bimbel.tb_wpm set c1='" + hc1+ "',c2='" +hc2+ "',c3='" +hc3+ "',c4='" + hc4+ "',c5='" + hc5+ "',skor='" + skor+ "' where

nama='" + nama+ "';"; MySqlConnection MyConn2 = new MySqlConnection(MyConnection2);

//MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

//MyReader2 = MyCommand2.ExecuteReader(); // Here our query will be executed and data saved into the database.

MyReader2 = MyCommand3.ExecuteReader(); // MessageBox.Show("Save Data");

MyConn2.Close();

}catch(Exception){

MessageBox.Show("Ada Error"); }

}

void Button2Click(object sender, EventArgs e) {

try{

DateTime waktuawal,waktuakhir; waktuawal=DateTime.Now;

double hc1,hc2,hc3,hc4,hc5,skorwpm; double tinggi=0;

string MyConnection2

= "server=localhost;port=3306;username=root;password="; MySqlConnection MyConn2

= new MySqlConnection(MyConnection2);

(10)

MyConn2);

MyConn2.Open();

MySqlCommand kueri = new MySqlCommand("SELECT * FROM db_spk_bimbel.tb_bobot",MyConn2);

string temp;

//kueri.CommandText = qw;

//koneksi.Open();

MySqlDataReader dr;

dr = kueri.ExecuteReader();

while(dr.Read()) {

temp = dr["nama"].ToString(); //matriks normalisasi

hc1 =Math.Pow(0.3,(Convert.ToDouble(dr["c1"]))); hc2 = Math.Pow(0.2,(Convert.ToDouble(dr["c2"]))); hc3

=Math.Pow(0.15, (Convert.ToDouble(dr["c3"])));

hc4 =Math.Pow(0.25,(Convert.ToDouble(dr["c4"]))); hc5 =Math.Pow(0.1, (Convert.ToDouble(dr["c5"]))); skorwpm=hc1*hc2*hc3*hc4*hc5;

String

strskorwpm=skorwpm.ToString("0.####################"); //MessageBox.Show(skorwpm.ToString());

if (skorwpm >= tinggi){ tinggi=skorwpm; textBox2.Text=temp; }

updateskorwpm(temp,hc1,hc2,hc3,hc4,hc5,strskorwpm );

}

MyConn2.Close(); lihatwpm();

waktuakhir=DateTime.Now;

TimeSpan lamawpm=waktuakhir.Subtract(waktuawal); wpm_time.Text=lamawpm.TotalMilliseconds.ToString()+" MilliSeconds";

}catch(Exception ex){

MessageBox.Show(ex.Message); }

}

void MetodeLoad(object sender, EventArgs e) {

}

(11)

{ }

void Panel1Paint(object sender, PaintEventArgs e) {

}

void TextBox1TextChanged(object sender, EventArgs e) {

}

void Label7Click(object sender, EventArgs e) {

}

void DataGridView4CellContentClick(object sender, DataGridVie wCellEventArgs e)

{ } } }

4.Bobot Kriteria

/*

* Created by SharpDevelop. * User: User7

* Date: 28/09/2015 * Time: 9:54

*

* To change this template use Tools | Options | Coding | Edit Standard Headers.

*/

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Linq.Expressions;

using System.Windows.Forms;

using MySql.Data.MySqlClient;

using System.Data;

using System.Data.OleDb;

namespace home1 {

/// <summary>

/// Description of kriteriabobot.

/// </summary>

(12)

{

public kriteriabobot() {

//

// The InitializeComponent() call is required for Windows Forms designer support.

//

InitializeComponent(); lihat();

//

// TODO: Add constructor code after the InitializeComponent() call.

//

}

void lihat(){

string MyConnection2

= "server=localhost;port=3306;username=root;password="; //Display query

string Query = "select * from db_spk_bimbel.tb_kriteriabobot;";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2

= new MySqlCommand(Query, MyConn2); MyConn2.Open();

//For offline connection we weill use MySqlDataAdapter class.

MySqlDataAdapter MyAdapter = new MySqlDataAdapter();

MyAdapter.SelectCommand = MyCommand2; //DataTable dTable = new DataTable();

DataTable dTable = new DataTable(); MyAdapter.Fill(dTable);

dataGridView1.DataSource = dTable; // here i have assign dTable object to the dataGridView1 object to display

data.

MyConn2.Close(); }

void KriteriabobotLoad(object sender, EventArgs e) {

} } }

5. Data Bimbingan

/*

(13)

* Date: 28/09/2015 * Time: 9:53

*

* To change this template use Tools | Options | Coding | Edit Standard Headers.

*/

using System;

using System.Collections.Generic;

using System.Drawing;

using System.Linq.Expressions;

using System.Windows.Forms;

using MySql.Data.MySqlClient;

using System.Data;

using System.Data.OleDb;

namespace home1 {

/// <summary>

/// Description of datalahan.

/// </summary>

public partial class databimbingan : Form {

double c1,c2,c3,c4,c5,c6,c7,c8,c9,c10;

double c1_pm,c2_pm,c3_pm,c4_pm,c5_pm,c6_pm,c7_pm,c8_pm; double c1_pm_ideal,c2_pm_ideal,c3_pm_ideal,c4_pm_ideal,c5_pm_ ideal,c6_pm_ideal,c7_pm_ideal,c8_pm_ideal;

double c1_pm_gap,c2_pm_gap,c3_pm_gap,c4_pm_gap,c5_pm_gap,c6_p m_gap,c7_pm_gap,c8_pm_gap;

double cf,sf,skor; public databimbingan() {

//

// The InitializeComponent() call is required for Windows Forms designer support.

//

InitializeComponent();

//

// TODO: Add constructor code after the InitializeComponent() call.

//

}

void Button1Click(object sender, EventArgs e) {

try {

string MyConnection2

(14)

db_spk_bimbel.data_bimbel(nama,biaya,fasilitas,jumlah_pertemuan,jumla h_lulus_PTN,jumlah_pengajar)

values('" +this.namabimbel.Text+ "','" +this.c1_biaya.Text+ "','" +th is.c2_fasilitas.Text+ "','" +this.c3_jlh_pert.Text+ "','" +this.c4_jl h_lls.Text+ "','" +this.c5_jlh_peng.Text+ "');";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

//MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

MyReader2 = MyCommand2.ExecuteReader(); // ekskusi kueri masuk ke database.

// MyReader2 = MyCommand3.ExecuteReader();

MessageBox.Show("Data Tersimpan"); MyConn2.Close();

insertbobot();

insertsaw_normalisasi(); insertwpm();

resetisi();

}

catch (Exception ex) {

MessageBox.Show(ex.Message); } }

void insertbobot() {

try {

string MyConnection2

= "datasource=localhost;port=3306;username=root;password="; //string Query = "insert into

db_padi.padisawah(nama,C1,C2,C3,C4,C5) values('"

+this.namapadisawah.Text+ "','" +c1+ "','" +c2+ "','" +c3+ "','" +c4+ "','" +c5+ "');";

string query2="insert into db_spk_bimbel.tb_bobot(nama,c1,c2,c3,c4,c5)

values('" +this.namabimbel.Text+ "','" +c1+ "','" +c2+ "','" +c3+ "', '" +c4+ "','" +c5+ "');";

(15)

//MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

//MyReader2 = MyCommand2.ExecuteReader(); // Here our query will be executed and data saved into the database.

MyReader2 = MyCommand3.ExecuteReader(); // MessageBox.Show("Save Data");

MyConn2.Close(); }

catch (Exception ex) {

MessageBox.Show(ex.Message); }

}

void insertsaw_normalisasi() {

try {

string MyConnection2

= "datasource=localhost;port=3306;username=root;password="; //string Query = "insert into

db_padi.padisawah(nama,C1,C2,C3,C4,C5) values('"

+this.namapadisawah.Text+ "','" +c1+ "','" +c2+ "','" +c3+ "','" +c4+ "','" +c5+ "');";

string query2="insert into

db_spk_bimbel.tb_normalisasi_saw(nama,normalisasi_c1,normalisasi_c2,n ormalisasi_c3,normalisasi_c4,normalisasi_c5,skor)

values('" +this.namabimbel.Text+ "','" +c1+ "','" +c2+ "','" +c3+ "', '" +c4+ "','" +c5+ "','" +0+ "');";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2);

//MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

//MyReader2 = MyCommand2.ExecuteReader(); // Here our query will be executed and data saved into the database.

MyReader2 = MyCommand3.ExecuteReader(); // MessageBox.Show("Save Data");

MyConn2.Close(); }

(16)

MessageBox.Show(ex.Message); }

}

void insertwpm() {

try {

string MyConnection2

= "datasource=localhost;port=3306;username=root;password="; //string Query = "insert into

db_padi.padisawah(nama,C1,C2,C3,C4,C5) values('"

+this.namapadisawah.Text+ "','" +c1+ "','" +c2+ "','" +c3+ "','" +c4+ "','" +c5+ "');";

string query2="insert into db_spk_bimbel.tb_wpm(nama,c1,c2,c3,c4,c5,skor)

values('" +this.namabimbel.Text+ "','" +c1+ "','" +c2+ "','" +c3+ "', '" +c4+ "','" +c5+ "','" +0+ "');";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2);

//MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

//MyReader2 = MyCommand2.ExecuteReader(); // Here our query will be executed and data saved into the database.

MyReader2 = MyCommand3.ExecuteReader(); // MessageBox.Show("Save Data");

MyConn2.Close(); }

catch (Exception ex) {

MessageBox.Show(ex.Message); }

}

void Unsur1SelectedIndexChanged(object sender, EventArgs e) {

if (c2_fasilitas.SelectedIndex==0){ c2=1;

}

(17)

c2=1.5;

}

else if (c2_fasilitas.SelectedIndex==2){ c2=3;

}

else if (c2_fasilitas.SelectedIndex==3){ c2=5;

} }

void Unsur2SelectedIndexChanged(object sender, EventArgs e) {

if (c3_jlh_pert.SelectedIndex==0){ c3=1;

}

else if (c3_jlh_pert.SelectedIndex==1){ c3=2;

}

else if (c3_jlh_pert.SelectedIndex==2){ c3=2.5;

}

else if (c3_jlh_pert.SelectedIndex==3){ c3=3;

}

else if (c3_jlh_pert.SelectedIndex==4){ c3=4;

} }

void Unsur3SelectedIndexChanged(object sender, EventArgs e) {

if (c4_jlh_lls.SelectedIndex==0){ c4=1;

(18)

}

else if (c4_jlh_lls.SelectedIndex==1){ c4=1.5;

}

else if (c4_jlh_lls.SelectedIndex==2){ c4=2;

}

else if (c4_jlh_lls.SelectedIndex==3){ c4=4;

}

else if (c4_jlh_lls.SelectedIndex==4){ c4=5;

} }

void Button4Click(object sender, EventArgs e) {

try {

string MyConnection2

= "server=localhost;port=3306;username=root;password="; //Display query

string Query = "select * from db_spk_bimbel.data_bimbel;";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2

= new MySqlCommand(Query, MyConn2); MyConn2.Open();

//For offline connection we weill use MySqlDataAdapter class.

MySqlDataAdapter MyAdapter = new MySqlDataAdapter();

MyAdapter.SelectCommand = MyCommand2; //DataTable dTable = new DataTable();

DataTable dTable = new DataTable(); MyAdapter.Fill(dTable);

(19)

data.

MyConn2.Close();

string MyConnectionpm

= "server=localhost;port=3306;username=root;password="; //Display query

string Querypm = "select * from db_spk_bimbel.tb_bobot;";

MySqlConnection MyConnpm = new MySqlConnection(MyConnectionpm); MySqlCommand MyCommandpm

= new MySqlCommand(Querypm, MyConnpm); MyConnpm.Open();

//For offline connection we weill use MySqlDataAdapter class.

MySqlDataAdapter MyAdapterpm = new MySqlDataAdapter();

MyAdapterpm.SelectCommand = MyCommandpm; //DataTable dTable = new DataTable();

DataTable dTablepm = new DataTable(); MyAdapterpm.Fill(dTablepm);

dataGridView2.DataSource = dTablepm; // here i have assign dTable object to the dataGridView1 object to display data.

MyConnpm.Close(); resetisi();

}

catch (Exception ex) {

MessageBox.Show(ex.Message); } }

void Button2Click(object sender, EventArgs e) {

resetisi(); }

void resetisi(){

namabimbel.Text=""; c1_biaya.Text=null; c2_fasilitas.Text=null; c3_jlh_pert.Text=null; c4_jlh_lls.Text=null; c5_jlh_peng.Text=null; }

(20)

{

try {

string MyConnection2

= "datasource=localhost;port=3306;username=root;password=";

string Query = "delete from db_spk_bimbel.data_bimbel where nama='" + this.namabimbel.Text + "';";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

MyReader2 = MyCommand2.ExecuteReader(); MessageBox.Show("Data Deleted");

MyConn2.Close(); deletebobot(); deletesaw(); deletewpm(); resetisi(); }

catch (Exception ex) {

MessageBox.Show(ex.Message); } }

void deletebobot(){ try

{

string MyConnection2

= "datasource=localhost;port=3306;username=root;password=";

string Query = "delete from db_spk_bimbel.tb_bobot where nama='" + this.namabimbel.Text + "';";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

MyReader2 = MyCommand2.ExecuteReader(); //MessageBox.Show("Data Deleted");

MyConn2.Close();

}

catch (Exception ex) {

MessageBox.Show(ex.Message); }

(21)

}

void deletesaw(){ try

{

string MyConnection2

= "datasource=localhost;port=3306;username=root;password="; string Query = "delete from

db_spk_bimbel.tb_normalisasi_saw where nama='" + this.namabimbel.Text + "';"; MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

MyReader2 = MyCommand2.ExecuteReader(); //MessageBox.Show("Data Deleted");

MyConn2.Close();

}

catch (Exception ex) {

MessageBox.Show(ex.Message); }

}

void deletewpm(){ try

{

string MyConnection2

= "datasource=localhost;port=3306;username=root;password="; string Query = "delete from db_spk_bimbel.tb_wpm where nama='" + this.namabimbel.Text + "';";

MySqlConnection MyConn2 = new MySqlConnection(MyConnection2); MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2);

MySqlDataReader MyReader2; MyConn2.Open();

MyReader2 = MyCommand2.ExecuteReader(); // MessageBox.Show("Data Deleted");

MyConn2.Close();

}

catch (Exception ex) {

(22)

}

void statusBiayaSelectedIndexChanged(object sender, EventArgs e)

{

if (c1_biaya.SelectedIndex==0){ c1=5;

}

else if (c1_biaya.SelectedIndex==1){ c1=3;

}

else if (c1_biaya.SelectedIndex==2){ c1=2.5;

}else if (c1_biaya.SelectedIndex==3){ c1=2;

}else if (c1_biaya.SelectedIndex==4){ c1=1;

} }

void jlhpengajarSelectedIndexChanged(object sender, EventArgs e)

{

if (c5_jlh_peng.SelectedIndex==0){ c5=1;

}

else if (c5_jlh_peng.SelectedIndex==1){ c5=2;

}

else if (c5_jlh_peng.SelectedIndex==2){ c5=2.5;

}

else if (c5_jlh_peng.SelectedIndex==3){ c5=3.5;

(23)

}

else if (c5_jlh_peng.SelectedIndex==3){ c5=4;

}

else if (c5_jlh_peng.SelectedIndex==4){ c5=5;

} }

void DataGridView1CellContentClick(object sender, DataGridVie wCellEventArgs e)

{

namabimbel.Text=

dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString(); }

void DataGridView2CellContentClick(object sender, DataGridVie wCellEventArgs e)

{

namabimbel.Text=

dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();

}

void DatabimbinganLoad(object sender, EventArgs e) {

}

void GroupBox2Enter(object sender, EventArgs e) {

(24)

CURRICULUM VITAE

---

Data Pribadi

Nama

: M. Pristian R.

Tempat/Tanggal Lahir: Lhokseumawe, 16 Oktober 1992

Jenis Kelamin

: Laki-laki

Tinggi/Berta Badan : 165 cm / 45 kg

Agama

: Islam

Kewarganegaraan

: Indonesia

Status

: Belum Menikah

Alamat

: Jl. Perjuangan No. 8, Setia Budi Medan, Sumatera Utara

No Hp

: 082362287622

Email

: pristian.mohd@yahoo.com

---

Riwayat Pendidikan

[1998 – 2004]

: SD Swasta Iskandar Muda

[2004 – 2007]

: SMP Swasta Iskandar Muda

[2007 – 2010]

: SMA Swasta Iskandar Muda

[2010 – 2015]

: S-1 Ilmu Komputer Universitas Sumatera Utara

---

Kemampuan IT :

Mampu mengoperasikan Microsoft Office (Ms.Word, Ms.Excel,

Ms.Power Point).

Mampu mengoperasikan Adobe Photoshop

(25)

Referensi

Dokumen terkait

Penelitian ini bertujuan untuk mengetahui daya toksisitas ekstrak daun kapuk randu terhadap hama ulat api kelapa sawit ( Setora nitens), yang telah dilaksanakan pada

Berdasarkan hasil penelitian dan pembahasan tersebut dapat diberikan saran kepada responden, Penelitian ini diharapakan agar responden dapat memanfaatkan waktu sebaik

Berkenan dengan hal di atas maka Peraturan Daerah Kabupaten Daerah Tingkat II Sumbawa Nomor 12 Tahun 1997 tentang Retribusi Penggantian Biaya Cetak Kartu

Puji dan syukur penulis panjatkan kepada Allah SWT atas segala rahmat dan karunia- Nya penulis dapat menyelesaikan Tugas Akhir yang berjudul “Aktivitas Media Relations

Oleh karena itu, penyusunan dan penerbitan Kamus Dwibahasa Bahasa Talaud- Bahasa Indonesia ini diharapkan dapat mengatasi kesenjangan kemampuan berbahasa Indonesia bagi

Kerangka teori kajian ini menunjukkan bahawa dalam program pendidikan khas masalah pendengaran di politeknik perlu diterapkan kemahiran insaniah.Kemahiran insaniah ini

Huria Kristen Batak Protestan yang disingkat HKBP adalah persekutuan orang Kristen dari suku Batak bangsa Indonesia di seluruh Indonesia dan di seluruh dunia

Dengan demikian metode deskriftif ini sesuai dengan masalah yang ingin diteliti penulis yaitu mengenai faktor penyebab perilaku menyimpang siswa di SMP Negeri