LAMPIRAN A : LISTING PROGRAM

Similar documents
LISTING PROGRAM. // // TODO: Add constructor code after the InitializeComponent()

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

LAMPIRAN A : LISTING PROGRAM

LAMPIRAN A LISTING PROGRAM

A-1 LISTING PROGRAM. 1. Form1.cs. Universitas Sumatera Utara

LISTING PROGRAM. void KOMPRESIToolStripMenuItemClick(object sender, EventArgs e) { Kompresi k = new Kompresi(); k.show(); this.

CALCULATOR APPLICATION

UNIT-3. Prepared by R.VINODINI 1

LISTING PROGRAM. a = b; b = c; c = a + b; } fibs.reverse(); for (int i = 0; i < fibs.count; i++) { if (n >= fibs[i]) { n = n - fibs[i];

LISTING PROGRAM. 1. Module SkripsiUmri.py. import sys, operator, codecs, time. class Timer(object): def init (self): self.t1= time.

CSIS 1624 CLASS TEST 6

Mainly three tables namely Teacher, Student and Class for small database of a school. are used. The snapshots of all three tables are shown below.

private void closetoolstripmenuitem_click(object sender, EventArgs e) { this.close(); }

The Open Core Interface SDK has to be installed on your development computer. The SDK can be downloaded at:

Bachelor s Thesis: Building Web Application for Mahabad University Graduate Affairs Afsaneh Nezami Savojbolaghi

Listing Program. private void exittoolstripmenuitem_click(object sender, EventArgs e) { Application.Exit(); }

LISTING PROGRAM. void FilteringToolStripMenuItemClick(object sender, EventAr s e) { Filtering a = new Filtering(); this.hide(); a.

Overview. Building a Web-Enabled Decision Support System. Integrating DSS in Business Curriculum. Introduction to DatabaseSupport Systems

LISTING PROGRAM. mainform.vb A-1. Universitas Sumatera Utara

Team project 2017 Dony Pratidana S. Hum Bima Agus Setyawan S. IIP

Object oriented lab /second year / review/lecturer: yasmin maki

if (say==0) { k.commandtext = "Insert into kullanici(k_adi,sifre) values('" + textbox3.text + "','" + textbox4.text + "')"; k.

C# winforms gridview

بسم هللا الرحمن الرحيم المحاضرة السابعة مستوى ثالث علوم حاسوب برمجة مرئية 2 )عملي ) جامعة الجزيرة محافظة اب الجمهورية اليمنية النافذة الرئيسية

Visual Basic/C# Programming (330)

Main Game Code. //ok honestly im not sure, if i guess its a class ment for this page called methodtimer that //either uses the timer or set to timer..

Now find the button component in the tool box. [if toolbox isn't present click VIEW on the top and click toolbox]

Lampiran 2 MASTER TABEL

Experiment 5 : Creating a Windows application to interface with 7-Segment LED display

LISTING PROGRAM. private void filetoolstripmenuitem_click(object sender, EventArgs e) { this.hide(); Form2 fr = new Form2(); fr.

You can call the project anything you like I will be calling this one project slide show.

string spath; string sedifile = "277_005010X228.X12"; string sseffile = "277_005010X228.SemRef.EVAL0.SEF";

MySQL Connector/NET Developer Guide

LISTING PROGRAM. namespace vigenere_des { public partial class MainPage : PhoneApplicationPage { public MainPage() { InitializeComponent(); }

عنوان مقاله : خواندن و نوشتن محتوای فایل های Excel بدون استفاده ازAutomation Excel تهیه وتنظیم کننده : مرجع تخصصی برنامه نویسان

// Program 2 - Extra Credit // CIS // Spring // Due: 3/11/2015. // By: Andrew L. Wright. //Edited by : Ben Spalding

UNIT - III BUILDING WINDOWS APPLICATION GENERAL WINDOWS CONTROLS FOR THE WINDOWS APPLICATION

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

First start a new Windows Form Application from C# and name it Interest Calculator. We need 3 text boxes. 4 labels. 1 button

LISTING PROGRAM. % UIWAIT makes pertama wait for user response (see UIRESUME) % uiwait(handles.figure1);

MySQL Connector/Net Developer Guide

LAMPIRAN. Universitas Sumatera Utara

Answer on Question# Programming, C#

MySQL Connector/Net Developer Guide

IBSDK Quick Start Tutorial for C# 2010

// Specify SEF file to load. oschema = (edischema) oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

Start Visual Studio and create a new windows form application under C# programming language. Call this project YouTube Alarm Clock.

} } public void getir() { DataTable dt = vt.dtgetir("select* from stok order by stokadi");

Listing Progam. Universitas Sumatera Utara

create database ABCD use ABCD create table bolumler ( bolumkodu int primary key, bolumadi varchar(20) )

// Precondition: None // Postcondition: The address' name has been set to the // specified value set;

เว บแอพล เคช น. private void Back_Click(object sender, EventArgs e) { this.webbrowser2.goback(); }

Chapter 12. Tool Strips, Status Strips, and Splitters

Quick Guide for the ServoWorks.NET API 2010/7/13

Huw Talliss Data Structures and Variables. Variables

// Specify SEF file to load. edischema oschema = oedidoc.loadschema(spath + sseffilename, SchemaTypeIDConstants. Schema_Standard_Exchange_Format);

COMPUTER SCIENCE 260CT SOFTWARE ENGINEERING

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

Advanced Programming C# Lecture 5. dr inż. Małgorzata Janik

Conventions in this tutorial

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

Lampiran B. Program pengendali

Philadelphia University Faculty of Information Technology. Visual Programming. Using C# -Work Sheets-

LAMPIRAN A: Listing Program

Network Operation System. netstat. ipconfig/tracert/ping. nslookup EEE 448 Computer Networks

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

Class Test 4. Question 1. Use notepad to create a console application that displays a stick figure. See figure 1. Question 2

Chapter 6 Dialogs. Creating a Dialog Style Form

Using Template Bookmarks for Automating Microsoft Word Reports

Tutorial 5 Completing the Inventory Application Introducing Programming

LIGHT_P_TOGGLE, LIGHT_N_TOGGLE, BATTERY_TOGGLE, ALTERNATOR_TOGGLE, AVIONICS_TOGGLE, FLOAT_RETRACT, FLOAT_EXTEND }

For this example, we will set up a small program to display a picture menu for a fast food take-away shop.

This is the start of the server code

Start Visual Studio, start a new Windows Form project under the C# language, name the project BalloonPop MooICT and click OK.

APÉNDICE J. CÓDIGO DEL ARCHIVO FORM1.CS EN LENGUAJE C# Comprende:

User-Defined Controls

private void Form1_Load(object sender, EventArgs e) {

Representing Recursive Relationships Using REP++ TreeView

Visual Basic/C# Programming (330)

Inheriting Windows Forms with Visual C#.NET

Create your own Meme Maker in C#

Developing for Mobile Devices Lab (Part 1 of 2)

Classes in C# namespace classtest { public class myclass { public myclass() { } } }

namespace Tst_Form { private: /// <summary> /// Required designer variable. /// </summary> System::ComponentModel::Container ^components;

A-1 LAMPIRAN A LISTING PROGRAM. Kode Program Form Main: Universitas Sumatera Utara

Eyes of the Dragon - XNA Part 37 Map Editor Revisited

Lab 4 (Introduction to C# and windows Form Applications)

Yes, this is still a listbox!

II. Programming Technologies

Click on the empty form and apply the following options to the properties Windows.

Getting Started with ComponentOne LiveLinq

IOSR Journal of Engineering (IOSRJEN) e-issn: , p-issn: Vol. 3, Issue 8 (August. 2013), V3 PP 25-33

Tutorial 6 Enhancing the Inventory Application Introducing Variables, Memory Concepts and Arithmetic

NI USB-TC01 Thermocouple Measurement Device

Unity and MySQL. Versions: Unity 3.0.0f5; MySQL Author: Jonathan Wood. Alias: Zumwalt. Date: 10/8/2010. Updated: 10/12/2010 to include JS code

Database Communication in Visual Studio/C# using Web Services

Appendix A Programkod

1. Windows Forms 2. Event-Handling Model 3. Basic Event Handling 4. Control Properties and Layout 5. Labels, TextBoxes and Buttons 6.

C:\homeworks\PenAttention_v13_src\PenAttention_v13_src\PenAttention4\PenAttention\PenAttention.cs 1 using System; 2 using System.Diagnostics; 3 using

PS2 Random Walk Simulator

Transcription:

46 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. Args e) e) void KRITERIALAHANToolStripMenuItemClick(object sender, Event Form a=new databimbingan(); a.show(); void DATALAHANToolStripMenuItemClick(object sender, EventArgs

47 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) void PictureBox2Click(object sender, EventArgs e)

48 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)

49 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; using MySql.Data.MySqlClient;

50 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; = "server=localhost;port=3306;username=root;password="; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand command1 = new MySqlCommand("select max(c1) from db_spk_bimbel.tb_bobot",myconn2);

51 ing()); maxc1=convert.todouble(command1.executescalar().tostr 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); if (skor >= tertinggi) tertinggi=skor; lahanterbaik=temp;

52 updateskorsaw(temp,hc1,hc2,hc3,hc4,hc5,skor); koneksi.close(); MilliSeconds"; waktuakhir=datetime.now; TimeSpan lama =waktuakhir.subtract(waktuawal); textbox1.text=lama.totalmilliseconds.tostring()+" catch (Exception ex) MessageBox.Show(ex.Message); lihatperangkingan(); sawtinggi.text=lahanterbaik; datatertinggi_pm(); void lihatwpm() try = "server=localhost;port=3306;username=root;password="; Display query string Query = "select * from db_spk_bimbel.tb_wpm ORDER BY skor DESC;"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); 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. catch (Exception ex) MessageBox.Show(ex.Message);

53 void lihatperangkingan() try = "server=localhost;port=3306;username=root;password="; Display query string Query = "select * from db_spk_bimbel.tb_normalisasi_saw ORDER BY skor DESC;"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); 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. catch(exception) MessageBox.Show("Ada Error"); void updateskorsaw(string nama,double hc1,double hc2,double h c3,double hc4,double hc5, double skor) try = "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+ "';"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2); MySqlDataReader MyReader2;

54 MyReader2 = MyCommand2.ExecuteReader(); our query will be executed and data saved into the database. MyReader2 = MyCommand3.ExecuteReader(); MessageBox.Show("Save Data"); Here catch(exception) MessageBox.Show("Ada Error"); void updateskorwpm(string nama,double hc1,double hc2,double h c3,double hc4,double hc5, String skor) try = "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+ "';"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); Here our query will be executed and data saved into the database. MyReader2 = MyCommand3.ExecuteReader(); MessageBox.Show("Save Data"); 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; = "server=localhost;port=3306;username=root;password="; MySqlCommand MyCommand2 = new MySqlCommand(Query,

55 MyConn2); 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; ); MilliSeconds"; updateskorwpm(temp,hc1,hc2,hc3,hc4,hc5,strskorwpm lihatwpm(); waktuakhir=datetime.now; TimeSpan lamawpm=waktuakhir.subtract(waktuawal); wpm_time.text=lamawpm.totalmilliseconds.tostring()+" catch(exception ex) MessageBox.Show(ex.Message); void MetodeLoad(object sender, EventArgs e) void Label4Click(object sender, EventArgs e)

56 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> public partial class kriteriabobot : Form

57 public kriteriabobot() The InitializeComponent() call is required for Windows Forms designer support. InitializeComponent(); lihat(); TODO: Add constructor code after the InitializeComponent() call. void lihat() = "server=localhost;port=3306;username=root;password="; Display query string Query = "select * from db_spk_bimbel.tb_kriteriabobot;"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); 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. void KriteriabobotLoad(object sender, EventArgs e) 5. Data Bimbingan /* * Created by SharpDevelop. * User: User7

58 * 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 = "datasource=localhost;port=3306;username=root;password="; string Query = "insert into

59 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+ "');"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); ekskusi kueri masuk ke database. MyReader2 = MyCommand3.ExecuteReader(); MessageBox.Show("Data Tersimpan"); insertbobot(); insertsaw_normalisasi(); insertwpm(); resetisi(); catch (Exception ex) MessageBox.Show(ex.Message); void insertbobot() try = "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+ "');";

60 MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); Here our query will be executed and data saved into the database. MyReader2 = MyCommand3.ExecuteReader(); MessageBox.Show("Save Data"); catch (Exception ex) MessageBox.Show(ex.Message); void insertsaw_normalisasi() try = "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+ "');"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); Here our query will be executed and data saved into the database. MyReader2 = MyCommand3.ExecuteReader(); MessageBox.Show("Save Data"); catch (Exception ex)

61 MessageBox.Show(ex.Message); void insertwpm() try = "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+ "');"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlCommand MyCommand3 = new MySqlCommand(query2, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); Here our query will be executed and data saved into the database. MyReader2 = MyCommand3.ExecuteReader(); MessageBox.Show("Save Data"); catch (Exception ex) MessageBox.Show(ex.Message); void Unsur1SelectedIndexChanged(object sender, EventArgs e) if (c2_fasilitas.selectedindex==0) c2=1; else if (c2_fasilitas.selectedindex==1)

62 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;

63 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 = "server=localhost;port=3306;username=root;password="; Display query string Query = "select * from db_spk_bimbel.data_bimbel;"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); 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

64 data. 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; void Button3Click(object sender, EventArgs e)

65 try = "datasource=localhost;port=3306;username=root;password="; string Query = "delete from db_spk_bimbel.data_bimbel where nama='" + this.namabimbel.text + "';"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); MessageBox.Show("Data Deleted"); deletebobot(); deletesaw(); deletewpm(); resetisi(); catch (Exception ex) MessageBox.Show(ex.Message); void deletebobot() try = "datasource=localhost;port=3306;username=root;password="; string Query = "delete from db_spk_bimbel.tb_bobot where nama='" + this.namabimbel.text + "';"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); MessageBox.Show("Data Deleted"); catch (Exception ex) MessageBox.Show(ex.Message);

66 void deletesaw() try = "datasource=localhost;port=3306;username=root;password="; string Query = "delete from db_spk_bimbel.tb_normalisasi_saw where nama='" + this.namabimbel.text + "';"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); MessageBox.Show("Data Deleted"); catch (Exception ex) MessageBox.Show(ex.Message); void deletewpm() try = "datasource=localhost;port=3306;username=root;password="; string Query = "delete from db_spk_bimbel.tb_wpm where nama='" + this.namabimbel.text + "';"; MySqlCommand MyCommand2 = new MySqlCommand(Query, MyConn2); MySqlDataReader MyReader2; MyReader2 = MyCommand2.ExecuteReader(); MessageBox.Show("Data Deleted"); catch (Exception ex) MessageBox.Show(ex.Message);

67 e) void statusbiayaselectedindexchanged(object sender, EventArgs 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; e) void jlhpengajarselectedindexchanged(object sender, EventArgs 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;

68 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)

69 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 ------------------------------------------------------------------------------------------------------- - Kemampuan IT : Mampu mengoperasikan Microsoft Office (Ms.Word, Ms.Excel, Ms.Power Point). Mampu mengoperasikan Adobe Photoshop Kemampuan Bahasa:

70 Bahasa Inggris Bahasa Indonesia