SlideShare a Scribd company logo
UAS Pemrograman Visual
“C# - Database”
Oleh :
Andriyan Dwi P. (115623003)
D3 MANAJEMEN INFORMATIKA A
JURUSAN TEKNIK ELEKTRO
FAKULTAS TEKNIK
UNIVERSITAS NEGERI SURABAYA
2013
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
1 | P a g e
SOAL UJIAN
1. Buat aplikasi yang menghasilkan ouput di bawah ini ;
a) ******* b) *
****** **
***** ***
**** ****
*** *****
** ******
* *******
c) ******* d)* *
****** ** **
***** *** ***
**** **** ****
*** ***** *****
** ****** ******
* **************
**
***
****
*****
******
*******
2. Buat aplikasi database yang terdiri dari form Login,form input
data(tambah,edit,simpan,delete,batal) database yang digunakan : mysql, sqlserver
express, posgresql
Nb : soal no.2 semakin lengkap aplikasinya semakin baik nilainya.
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
2 | P a g e
No.1)
CONSOLE
a. Source code :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace UAS_no1
{
class a
{
static void Main(string[] args)
{
string lagi;
do
{
int a, i, j;
Console.WriteLine("Berapa Baris Bintang ?");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("-----------------------------");
for (i = a; i >= 1; i--)
{
for (j = i; j >= 1; j--)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.Write("Apakah Anda ingin lagi ?[y/t] n");
lagi = Convert.ToString(Console.ReadLine());
} while (lagi == "y" || lagi == "Y");
}
}
}
Screenshoot :
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
3 | P a g e
b. Source code :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UAS_1b
{
class b
{
static void Main(string[] args)
{
string lagi;
do
{
int a, i, j;
Console.WriteLine("Berapa Baris Bintang ?");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("-----------------------------");
for (i = 1; i <= a; i++)
{
for (j = 1; j <= i; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.Write("Apakah Anda ingin lagi ?[y/t] n");
lagi = Convert.ToString(Console.ReadLine());
} while (lagi == "y" || lagi == "Y");
}
}
}
Screenshoot :
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
4 | P a g e
c. Source code :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UAS_1c
{
class c
{
static void Main(string[] args)
{
string lagi;
do
{
int a, i, j;
Console.WriteLine("Berapa Baris Bintang ?");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("-----------------------------");
for (i = a; i >= 1; i--)
{
for (j = i; j >= 1; j--)
{
Console.Write("*");
}
Console.WriteLine();
}
for (i = 1; i <= a; i++)
{
for (j = 1; j <= i; j++)
{
Console.Write("*");
}
Console.WriteLine();
}
Console.Write("Apakah Anda ingin lagi ?[y/t] n");
lagi = Convert.ToString(Console.ReadLine());
} while (lagi == "y" || lagi == "Y");
}
}
}
Screenshoot :
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
5 | P a g e
d. Source code :
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace UAS_1d
{
class d
{
static void Main(string[] args)
{
string lagi;
do
{
int a, i, j;
Console.WriteLine("Berapa Baris Bintang ?");
a = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("-----------------------------");
{
int b, c, d;
d = 1; c = a - 1;
Console.Write("n");
for (i = 0; i < a * 2 - 1; i++)
{
if (i < a)
{
for (j = 0; j < a * 2 - 1; j++)
{
b = a - c;
if ((j < b) || (j >= (b + 2 * c - 1)))
{
Console.Write("*");
}
else
{
Console.Write(" ");
}
}
c = c - 1;
}
Console.WriteLine();
}
}
Console.Write("Apakah Anda ingin lagi ?[y/t] n");
lagi = Convert.ToString(Console.ReadLine());
} while (lagi == "y" || lagi == "Y");
}
}
}
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
6 | P a g e
Screenshoot :
WINDOWS FORM
Source code :
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;
namespace UAS_no1
{
public partial class UAS_1 : Form
{
public UAS_1()
{
InitializeComponent();
}
int a, i, j;
private void btnReset_Click(object sender, EventArgs e)
{
txtBaris.ResetText();
richTxtHasil.ResetText();
}
private void btnA_Click(object sender, EventArgs e)
{
a = System.Convert.ToInt32(txtBaris.Text);
for (i = a; i >= 1; i--)
{
for (j = i; j >= 1; j--)
{
richTxtHasil.AppendText("*");
}
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
7 | P a g e
richTxtHasil.AppendText(Environment.NewLine);
}
}
private void btnB_Click(object sender, EventArgs e)
{
a = System.Convert.ToInt32(txtBaris.Text);
for (i = 1; i <= a; i++)
{
for (j = 1; j <= i; j++)
{
richTxtHasil.AppendText("*");
}
richTxtHasil.AppendText(Environment.NewLine);
}
}
private void btnC_Click(object sender, EventArgs e)
{
a = System.Convert.ToInt32(txtBaris.Text);
for (i = a; i >= 1; i--)
{
for (j = i; j >= 1; j--)
{
richTxtHasil.AppendText("*");
}
richTxtHasil.AppendText(Environment.NewLine);
}
for (i = 1; i <= a; i++)
{
for (j = 1; j <= i; j++)
{
richTxtHasil.AppendText("*");
}
richTxtHasil.AppendText(Environment.NewLine);
}
}
private void btnD_Click(object sender, EventArgs e)
{
int b, c, d;
d = 1; c = a - 1;
a = System.Convert.ToInt32(txtBaris.Text);
Console.Write("n");
for (i = 0; i < a * 2 - 1; i++)
{
if (i < a)
{
for (j = 0; j < a * 2 - 1; j++)
{
b = a - c;
if ((j < b) || (j >= (b + 2 * c - 1)))
{
richTxtHasil.AppendText("*");
}
else
{
richTxtHasil.AppendText(" ");
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
8 | P a g e
}
}
c = c - 1;
}
richTxtHasil.AppendText(Environment.NewLine);
}
}
}
}
Screenshoot :
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
9 | P a g e
No. 2) Database : MySQL
LOGIN
Source Code :
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 MySql.Data.MySqlClient;
namespace UAS_no2
{
public partial class Login : Form
{
public Login()
{
InitializeComponent();
txtPassword.PasswordChar = '*';
txtPassword.MaxLength = 9;
}
private void btnLogin_Click(object sender, EventArgs e)
{
try
{
string myConnection =
"datasource=localhost;port=3306;username=root;password=";
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
10 | P a g e
MySqlConnection myConn = new MySqlConnection(myConnection);
MySqlCommand SelectCommand = new MySqlCommand("select * from
visual.login where username='" + this.txtUsername.Text + "' and password='" +
this.txtPassword.Text + "' ;", myConn);
MySqlDataReader myReader;
myConn.Open();
myReader = SelectCommand.ExecuteReader();
int count = 0;
while (myReader.Read())
{
count = count + 1;
}
if (count == 1)
{
MessageBox.Show("Username dan password Anda benar");
this.Hide();
MenuUtama f2 = new MenuUtama();
f2.ShowDialog();
}
else if (count > 1)
{
MessageBox.Show("Duplicate Username dan Password . . . Access
denied");
}
else
{
MessageBox.Show("Username dan password Anda Salah. . . Please try
again !");
myConn.Close();
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnReset_Click(object sender, EventArgs e)
{
txtUsername.ResetText();
txtPassword.ResetText();
}
private void Login_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult dialog = MessageBox.Show("Beneran sudah selesai nie ? hhe",
"Exit", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)
{
Application.Exit();
}
else if (dialog == DialogResult.No)
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
11 | P a g e
{
e.Cancel = true;
}
}
}
}
Screenshoot :
Setelah berhasil melakukan proses login, user akan langsung masuk ke Form Menu Utama,
dimana pada form ini proses Insert, Update, Delete dan proses menampilkan data terjadi.
Menu Utama
Source Code :
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.IO;
using MySql.Data.MySqlClient;
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
12 | P a g e
namespace UAS_no2
{
public partial class MenuUtama : Form
{
public MenuUtama()
{
InitializeComponent();
fillCombo();
load_table();
Load_chart();
}
string kelamin;
void Load_chart()
{
string constring =
"datasource=localhost;port=3306;username=root;password=";
string lihat = "select * from visual.biodata;";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase);
MySqlDataReader myReader;
try
{
conDatabase.Open();
myReader = cmdLihat.ExecuteReader();
while (myReader.Read())
{
this.chart1.Series["Umur"].Points.AddXY(myReader.GetString("fname"),
myReader.GetString("Umur"));
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
void fillCombo()
{
string constring =
"datasource=localhost;port=3306;username=root;password=";
string lihat = "select * from visual.biodata;";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase);
MySqlDataReader myReader;
try
{
conDatabase.Open();
myReader = cmdLihat.ExecuteReader();
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
13 | P a g e
while (myReader.Read())
{
string sNama = myReader.GetString("fname");
comboBox1.Items.Add(sNama);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
void load_table()
{
string constring =
"datasource=localhost;port=3306;username=root;password=";
string lihat = "select idbiodata as 'ID', fname as 'First Name', lname as
'Last Name', Umur, gender as 'Jenis Kelamin', tanggallahir as 'Tanggal Lahir' from
visual.biodata;";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase);
try
{
MySqlDataAdapter sda = new MySqlDataAdapter();
sda.SelectCommand = cmdLihat;
DataTable dbdataset = new DataTable();
sda.Fill(dbdataset);
BindingSource bSource = new BindingSource();
bSource.DataSource = dbdataset;
dataGridView1.DataSource = bSource;
sda.Update(dbdataset);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void btnSimpan_Click(object sender, EventArgs e)
{
byte[] imageBt= null;
FileStream fstream = new FileStream(this.txtImage_loc.Text, FileMode.Open,
FileAccess.Read);
BinaryReader br = new BinaryReader(fstream);
imageBt = br.ReadBytes((int)fstream.Length);
string constring =
"datasource=localhost;port=3306;username=root;password=";
string insert = "insert into visual.biodata
(idbiodata,fname,lname,umur,gender,tanggallahir,gambar)"+
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
14 | P a g e
"values('" + this.txtID.Text + "','" + this.txtFname.Text + "','" +
this.txtLname.Text + "','" + this.txtUmur.Text +
"','"+kelamin+"','"+this.dateTimePicker1.Text+"','"+this.pictureBox1+"');";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdInsert = new MySqlCommand(insert, conDatabase);
MySqlDataReader MyReader;
try{
conDatabase.Open();
//cmdInsert.Parameters.Add(new MySqlParameter("@IMG", imageBt));
MyReader = cmdInsert.ExecuteReader();
MessageBox.Show("Tersimpan");
}catch(Exception ex)
{
MessageBox.Show(ex.Message);
}
load_table();
//fillCombo();
}
private void btnReset_Click(object sender, EventArgs e)
{
txtID.ResetText();
txtFname.ResetText();
txtLname.ResetText();
txtUmur.ResetText();
}
private void btnEdit_Click(object sender, EventArgs e)
{
string constring =
"datasource=localhost;port=3306;username=root;password=";
string update = "update visual.biodata set idbiodata='" + this.txtID.Text
+ "',fname='" + this.txtFname.Text + "',lname='" + this.txtLname.Text + "',umur='" +
this.txtUmur.Text + "',tanggallahir='"+this.dateTimePicker1.Text+"' where idbiodata='"
+ this.txtID.Text + "';";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdUpdate = new MySqlCommand(update, conDatabase);
MySqlDataReader myReader;
try
{
conDatabase.Open();
myReader = cmdUpdate.ExecuteReader();
MessageBox.Show("Ter-update");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
load_table();
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
15 | P a g e
fillCombo();
}
private void btnHapus_Click(object sender, EventArgs e)
{
string constring =
"datasource=localhost;port=3306;username=root;password=";
string hapus = "delete from visual.biodata where idbiodata='" +
this.txtID.Text + "';";
string lihat = "select * from visual.biodata";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdHapus = new MySqlCommand(hapus, conDatabase);
MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase);
MySqlDataReader myReader;
try
{
conDatabase.Open();
myReader = cmdHapus.ExecuteReader();
MessageBox.Show("Terhapus");
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
load_table();
//fillCombo();
}
//private void button1_Click(object sender, EventArgs e)
//{
//string namestr = txtFname.Text;
//comboBox1.Items.Add(namestr);
//}
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string constring =
"datasource=localhost;port=3306;username=root;password=";
string lihat = "select * from visual.biodata where fname='" +
comboBox1.Text + "'";
MySqlConnection conDatabase = new MySqlConnection(constring);
MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase);
MySqlDataReader myReader;
try
{
conDatabase.Open();
myReader = cmdLihat.ExecuteReader();
while (myReader.Read())
{
string sID = myReader.GetString("idbiodata");
string sFname = myReader.GetString("fname");
string sLname = myReader.GetString("lname");
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
16 | P a g e
string sUmur = myReader.GetString("umur");
txtID.Text = sID;
txtFname.Text = sFname;
txtLname.Text = sLname;
txtUmur.Text = sUmur;
//byte[] imgg = (byte[])(myReader["gambar"]);
//if (imgg == null)
//{
// pictureBox1.Image = null;
// }
// else
// {
// MemoryStream mStream = new MemoryStream(imgg);
// pictureBox1.Image =
System.Drawing.Image.FromStream(mStream);
// }
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
private void dataGridView1_CellContentClick(object sender,
DataGridViewCellEventArgs e)
{
if (e.RowIndex >= 0)
{
DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex];
txtID.Text = row.Cells["ID"].Value.ToString();
txtFname.Text = row.Cells["First Name"].Value.ToString();
txtLname.Text = row.Cells["Last Name"].Value.ToString();
txtUmur.Text = row.Cells["Umur"].Value.ToString();
}
}
private void MenuUtama_FormClosing(object sender, FormClosingEventArgs e)
{
DialogResult dialog = MessageBox.Show("Beneran sudah selesai nie ? hhe",
"Exit", MessageBoxButtons.YesNo);
if (dialog == DialogResult.Yes)
{
Application.Exit();
}
else if (dialog == DialogResult.No)
{
e.Cancel = true;
}
}
[LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013
17 | P a g e
private void rbtnLaki_CheckedChanged(object sender, EventArgs e)
{
kelamin = "Laki-laki";
}
private void rbtnPerempuan_CheckedChanged(object sender, EventArgs e)
{
kelamin = "Perempuan";
}
private void btnLoadChart_Click(object sender, EventArgs e)
{
Load_chart();
}
private void button1_Click(object sender, EventArgs e)
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Filter = "JPG Files(*.jpg)|*.jpg|PNG Files(*.png)|*.png";
dlg.Title = "Pilih Foto Diri";
if (dlg.ShowDialog() == DialogResult.OK)
{
string picloc = dlg.FileName.ToString();
txtImage_loc.Text = picloc;
pictureBox1.ImageLocation = picloc;
}
}
}
}
Screenshoot :

More Related Content

What's hot

INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
Darwin Durand
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventasDAYANA RETO
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
Dmitriy Morozov
 
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
British Council
 
java experiments and programs
java experiments and programsjava experiments and programs
java experiments and programs
Karuppaiyaa123
 
Михаил Матросов, Повседневный С++: boost и STL
Михаил Матросов, Повседневный С++: boost и STLМихаил Матросов, Повседневный С++: boost и STL
Михаил Матросов, Повседневный С++: boost и STL
Sergey Platonov
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185
Mahmoud Samir Fayed
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers
PROIDEA
 
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
PROIDEA
 
Kotlin coroutines
Kotlin coroutines Kotlin coroutines
Kotlin coroutines
TSE-JU LIN(Louis)
 
Immutability, and how to do it in JavaScripts
Immutability, and how to do it in JavaScriptsImmutability, and how to do it in JavaScripts
Immutability, and how to do it in JavaScripts
Anton Astashov
 
The Ring programming language version 1.4 book - Part 12 of 30
The Ring programming language version 1.4 book - Part 12 of 30The Ring programming language version 1.4 book - Part 12 of 30
The Ring programming language version 1.4 book - Part 12 of 30
Mahmoud Samir Fayed
 
Dive into kotlins coroutines
Dive into kotlins coroutinesDive into kotlins coroutines
Dive into kotlins coroutines
Freddie Wang
 
Functions
FunctionsFunctions
Functions
G.C Reddy
 
Voce Tem Orgulho Do Seu Codigo
Voce Tem Orgulho Do Seu CodigoVoce Tem Orgulho Do Seu Codigo
Voce Tem Orgulho Do Seu Codigo
Victor Hugo Germano
 

What's hot (20)

INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVERINSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
INSERCION DE REGISTROS DESDE VISUAL.NET A UNA BD DE SQL SERVER
 
Ss
SsSs
Ss
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventas
 
Property-based testing
Property-based testingProperty-based testing
Property-based testing
 
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
Sokoban Game Development Using Java ( Updated using Screenshots & Class Diagr...
 
java experiments and programs
java experiments and programsjava experiments and programs
java experiments and programs
 
Михаил Матросов, Повседневный С++: boost и STL
Михаил Матросов, Повседневный С++: boost и STLМихаил Матросов, Повседневный С++: boost и STL
Михаил Матросов, Повседневный С++: boost и STL
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers
 
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
4Developers: Michał Szczepanik- Kotlin - Let’s ketchup it
 
syed
syedsyed
syed
 
Kotlin coroutines
Kotlin coroutines Kotlin coroutines
Kotlin coroutines
 
Immutability, and how to do it in JavaScripts
Immutability, and how to do it in JavaScriptsImmutability, and how to do it in JavaScripts
Immutability, and how to do it in JavaScripts
 
The Ring programming language version 1.4 book - Part 12 of 30
The Ring programming language version 1.4 book - Part 12 of 30The Ring programming language version 1.4 book - Part 12 of 30
The Ring programming language version 1.4 book - Part 12 of 30
 
Dive into kotlins coroutines
Dive into kotlins coroutinesDive into kotlins coroutines
Dive into kotlins coroutines
 
Ac2
Ac2Ac2
Ac2
 
Functions
FunctionsFunctions
Functions
 
Voce Tem Orgulho Do Seu Codigo
Voce Tem Orgulho Do Seu CodigoVoce Tem Orgulho Do Seu Codigo
Voce Tem Orgulho Do Seu Codigo
 
Clojure functions 4
Clojure functions 4Clojure functions 4
Clojure functions 4
 
A More Flash Like Web?
A More Flash Like Web?A More Flash Like Web?
A More Flash Like Web?
 

Viewers also liked

Web Programming Syaria - PHP
Web Programming Syaria - PHPWeb Programming Syaria - PHP
Web Programming Syaria - PHP
Dudy Ali
 
Seri Belajar Mandiri - Pemrograman C# Untuk Pemula
Seri Belajar Mandiri - Pemrograman C# Untuk PemulaSeri Belajar Mandiri - Pemrograman C# Untuk Pemula
Seri Belajar Mandiri - Pemrograman C# Untuk Pemula
Agus Kurniawan
 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XML
Dudy Ali
 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVA
Dudy Ali
 
Information System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan KeamananInformation System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan Keamanan
Dudy Ali
 
Java CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseJava CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server Database
Dudy Ali
 
Information System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan EkstranetInformation System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan Ekstranet
Dudy Ali
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
Dudy Ali
 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
Dudy Ali
 
XML Schema Part 1
XML Schema Part 1XML Schema Part 1
XML Schema Part 1
Dudy Ali
 
Information System Security - Serangan dan Pengawasan
Information System Security - Serangan dan PengawasanInformation System Security - Serangan dan Pengawasan
Information System Security - Serangan dan Pengawasan
Dudy Ali
 
Object Oriented Programming - Introduction
Object Oriented Programming - IntroductionObject Oriented Programming - Introduction
Object Oriented Programming - Introduction
Dudy Ali
 

Viewers also liked (12)

Web Programming Syaria - PHP
Web Programming Syaria - PHPWeb Programming Syaria - PHP
Web Programming Syaria - PHP
 
Seri Belajar Mandiri - Pemrograman C# Untuk Pemula
Seri Belajar Mandiri - Pemrograman C# Untuk PemulaSeri Belajar Mandiri - Pemrograman C# Untuk Pemula
Seri Belajar Mandiri - Pemrograman C# Untuk Pemula
 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XML
 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVA
 
Information System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan KeamananInformation System Security - Konsep dan Kebijakan Keamanan
Information System Security - Konsep dan Kebijakan Keamanan
 
Java CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server DatabaseJava CRUD Mechanism with SQL Server Database
Java CRUD Mechanism with SQL Server Database
 
Information System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan EkstranetInformation System Security - Komponen Intranet dan Ekstranet
Information System Security - Komponen Intranet dan Ekstranet
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NET
 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2
 
XML Schema Part 1
XML Schema Part 1XML Schema Part 1
XML Schema Part 1
 
Information System Security - Serangan dan Pengawasan
Information System Security - Serangan dan PengawasanInformation System Security - Serangan dan Pengawasan
Information System Security - Serangan dan Pengawasan
 
Object Oriented Programming - Introduction
Object Oriented Programming - IntroductionObject Oriented Programming - Introduction
Object Oriented Programming - Introduction
 

Similar to Pemrograman visual

Functional JavaScript for everyone
Functional JavaScript for everyoneFunctional JavaScript for everyone
Functional JavaScript for everyone
Bartek Witczak
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
epamspb
 
Program(Output)
Program(Output)Program(Output)
Program(Output)princy75
 
オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)
Takayuki Goto
 
C# Assignmet Help
C# Assignmet HelpC# Assignmet Help
C# Assignmet Help
Programming Homework Help
 
Project_Euler_No_104_Pandigital_Fibonacci_ends
Project_Euler_No_104_Pandigital_Fibonacci_endsProject_Euler_No_104_Pandigital_Fibonacci_ends
Project_Euler_No_104_Pandigital_Fibonacci_ends? ?
 
(Rx).NET' way of async programming (.NET summit 2017 Belarus)
(Rx).NET' way of async programming (.NET summit 2017 Belarus)(Rx).NET' way of async programming (.NET summit 2017 Belarus)
(Rx).NET' way of async programming (.NET summit 2017 Belarus)
Stas Rivkin
 
Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Data
greenwop
 
Nested For Loops and Class Constants in Java
Nested For Loops and Class Constants in JavaNested For Loops and Class Constants in Java
Nested For Loops and Class Constants in Java
Pokequesthero
 
Base de-datos
Base de-datosBase de-datos
Base de-datos
ferney1428
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsTypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
Alfonso Peletier
 
JAVA.pdf
JAVA.pdfJAVA.pdf
JAVA.pdf
jyotir7777
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
Tomek Kaczanowski
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy codeShriKant Vashishtha
 
Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginners
ishan0019
 

Similar to Pemrograman visual (20)

C# labprograms
C# labprogramsC# labprograms
C# labprograms
 
Functional JavaScript for everyone
Functional JavaScript for everyoneFunctional JavaScript for everyone
Functional JavaScript for everyone
 
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
#ITsubbotnik Spring 2017: Roman Iovlev "Java edge in test automation"
 
Sam wd programs
Sam wd programsSam wd programs
Sam wd programs
 
Program(Output)
Program(Output)Program(Output)
Program(Output)
 
オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)オープンデータを使ったモバイルアプリ開発(応用編)
オープンデータを使ったモバイルアプリ開発(応用編)
 
TechTalk - Dotnet
TechTalk - DotnetTechTalk - Dotnet
TechTalk - Dotnet
 
C#, What Is Next?
C#, What Is Next?C#, What Is Next?
C#, What Is Next?
 
C# Assignmet Help
C# Assignmet HelpC# Assignmet Help
C# Assignmet Help
 
Project_Euler_No_104_Pandigital_Fibonacci_ends
Project_Euler_No_104_Pandigital_Fibonacci_endsProject_Euler_No_104_Pandigital_Fibonacci_ends
Project_Euler_No_104_Pandigital_Fibonacci_ends
 
(Rx).NET' way of async programming (.NET summit 2017 Belarus)
(Rx).NET' way of async programming (.NET summit 2017 Belarus)(Rx).NET' way of async programming (.NET summit 2017 Belarus)
(Rx).NET' way of async programming (.NET summit 2017 Belarus)
 
Category theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) DataCategory theory, Monads, and Duality in the world of (BIG) Data
Category theory, Monads, and Duality in the world of (BIG) Data
 
Nested For Loops and Class Constants in Java
Nested For Loops and Class Constants in JavaNested For Loops and Class Constants in Java
Nested For Loops and Class Constants in Java
 
Base de-datos
Base de-datosBase de-datos
Base de-datos
 
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic LabsTypeScript - All you ever wanted to know - Tech Talk by Epic Labs
TypeScript - All you ever wanted to know - Tech Talk by Epic Labs
 
JAVA.pdf
JAVA.pdfJAVA.pdf
JAVA.pdf
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
 
Working effectively with legacy code
Working effectively with legacy codeWorking effectively with legacy code
Working effectively with legacy code
 
Java practice programs for beginners
Java practice programs for beginnersJava practice programs for beginners
Java practice programs for beginners
 

More from Univ. State of Surabaya

Meresensi buku
Meresensi bukuMeresensi buku
Meresensi buku
Univ. State of Surabaya
 
S E L V O L T A
S E L  V O L T AS E L  V O L T A
S E L V O L T A
Univ. State of Surabaya
 
Meresensi Buku
Meresensi  BukuMeresensi  Buku
Meresensi Buku
Univ. State of Surabaya
 

More from Univ. State of Surabaya (7)

Resensi Buku non fiksi
Resensi Buku non fiksiResensi Buku non fiksi
Resensi Buku non fiksi
 
Error code for canon mp145
Error code for canon mp145Error code for canon mp145
Error code for canon mp145
 
Meresensi buku
Meresensi bukuMeresensi buku
Meresensi buku
 
Erro
ErroErro
Erro
 
S E L V O L T A
S E L  V O L T AS E L  V O L T A
S E L V O L T A
 
Meresensi Buku
Meresensi  BukuMeresensi  Buku
Meresensi Buku
 
Sel volta
Sel voltaSel volta
Sel volta
 

Recently uploaded

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
EverAndrsGuerraGuerr
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
timhan337
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
DhatriParmar
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
Peter Windle
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 

Recently uploaded (20)

Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
Thesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.pptThesis Statement for students diagnonsed withADHD.ppt
Thesis Statement for students diagnonsed withADHD.ppt
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Honest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptxHonest Reviews of Tim Han LMA Course Program.pptx
Honest Reviews of Tim Han LMA Course Program.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
The Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptxThe Accursed House by Émile Gaboriau.pptx
The Accursed House by Émile Gaboriau.pptx
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Embracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic ImperativeEmbracing GenAI - A Strategic Imperative
Embracing GenAI - A Strategic Imperative
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.Biological Screening of Herbal Drugs in detailed.
Biological Screening of Herbal Drugs in detailed.
 

Pemrograman visual

  • 1. UAS Pemrograman Visual “C# - Database” Oleh : Andriyan Dwi P. (115623003) D3 MANAJEMEN INFORMATIKA A JURUSAN TEKNIK ELEKTRO FAKULTAS TEKNIK UNIVERSITAS NEGERI SURABAYA 2013
  • 2. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 1 | P a g e SOAL UJIAN 1. Buat aplikasi yang menghasilkan ouput di bawah ini ; a) ******* b) * ****** ** ***** *** **** **** *** ***** ** ****** * ******* c) ******* d)* * ****** ** ** ***** *** *** **** **** **** *** ***** ***** ** ****** ****** * ************** ** *** **** ***** ****** ******* 2. Buat aplikasi database yang terdiri dari form Login,form input data(tambah,edit,simpan,delete,batal) database yang digunakan : mysql, sqlserver express, posgresql Nb : soal no.2 semakin lengkap aplikasinya semakin baik nilainya.
  • 3. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 2 | P a g e No.1) CONSOLE a. Source code : using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UAS_no1 { class a { static void Main(string[] args) { string lagi; do { int a, i, j; Console.WriteLine("Berapa Baris Bintang ?"); a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("-----------------------------"); for (i = a; i >= 1; i--) { for (j = i; j >= 1; j--) { Console.Write("*"); } Console.WriteLine(); } Console.Write("Apakah Anda ingin lagi ?[y/t] n"); lagi = Convert.ToString(Console.ReadLine()); } while (lagi == "y" || lagi == "Y"); } } } Screenshoot :
  • 4. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 3 | P a g e b. Source code : using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace UAS_1b { class b { static void Main(string[] args) { string lagi; do { int a, i, j; Console.WriteLine("Berapa Baris Bintang ?"); a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("-----------------------------"); for (i = 1; i <= a; i++) { for (j = 1; j <= i; j++) { Console.Write("*"); } Console.WriteLine(); } Console.Write("Apakah Anda ingin lagi ?[y/t] n"); lagi = Convert.ToString(Console.ReadLine()); } while (lagi == "y" || lagi == "Y"); } } } Screenshoot :
  • 5. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 4 | P a g e c. Source code : using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace UAS_1c { class c { static void Main(string[] args) { string lagi; do { int a, i, j; Console.WriteLine("Berapa Baris Bintang ?"); a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("-----------------------------"); for (i = a; i >= 1; i--) { for (j = i; j >= 1; j--) { Console.Write("*"); } Console.WriteLine(); } for (i = 1; i <= a; i++) { for (j = 1; j <= i; j++) { Console.Write("*"); } Console.WriteLine(); } Console.Write("Apakah Anda ingin lagi ?[y/t] n"); lagi = Convert.ToString(Console.ReadLine()); } while (lagi == "y" || lagi == "Y"); } } } Screenshoot :
  • 6. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 5 | P a g e d. Source code : using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace UAS_1d { class d { static void Main(string[] args) { string lagi; do { int a, i, j; Console.WriteLine("Berapa Baris Bintang ?"); a = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("-----------------------------"); { int b, c, d; d = 1; c = a - 1; Console.Write("n"); for (i = 0; i < a * 2 - 1; i++) { if (i < a) { for (j = 0; j < a * 2 - 1; j++) { b = a - c; if ((j < b) || (j >= (b + 2 * c - 1))) { Console.Write("*"); } else { Console.Write(" "); } } c = c - 1; } Console.WriteLine(); } } Console.Write("Apakah Anda ingin lagi ?[y/t] n"); lagi = Convert.ToString(Console.ReadLine()); } while (lagi == "y" || lagi == "Y"); } } }
  • 7. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 6 | P a g e Screenshoot : WINDOWS FORM Source code : 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; namespace UAS_no1 { public partial class UAS_1 : Form { public UAS_1() { InitializeComponent(); } int a, i, j; private void btnReset_Click(object sender, EventArgs e) { txtBaris.ResetText(); richTxtHasil.ResetText(); } private void btnA_Click(object sender, EventArgs e) { a = System.Convert.ToInt32(txtBaris.Text); for (i = a; i >= 1; i--) { for (j = i; j >= 1; j--) { richTxtHasil.AppendText("*"); }
  • 8. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 7 | P a g e richTxtHasil.AppendText(Environment.NewLine); } } private void btnB_Click(object sender, EventArgs e) { a = System.Convert.ToInt32(txtBaris.Text); for (i = 1; i <= a; i++) { for (j = 1; j <= i; j++) { richTxtHasil.AppendText("*"); } richTxtHasil.AppendText(Environment.NewLine); } } private void btnC_Click(object sender, EventArgs e) { a = System.Convert.ToInt32(txtBaris.Text); for (i = a; i >= 1; i--) { for (j = i; j >= 1; j--) { richTxtHasil.AppendText("*"); } richTxtHasil.AppendText(Environment.NewLine); } for (i = 1; i <= a; i++) { for (j = 1; j <= i; j++) { richTxtHasil.AppendText("*"); } richTxtHasil.AppendText(Environment.NewLine); } } private void btnD_Click(object sender, EventArgs e) { int b, c, d; d = 1; c = a - 1; a = System.Convert.ToInt32(txtBaris.Text); Console.Write("n"); for (i = 0; i < a * 2 - 1; i++) { if (i < a) { for (j = 0; j < a * 2 - 1; j++) { b = a - c; if ((j < b) || (j >= (b + 2 * c - 1))) { richTxtHasil.AppendText("*"); } else { richTxtHasil.AppendText(" ");
  • 9. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 8 | P a g e } } c = c - 1; } richTxtHasil.AppendText(Environment.NewLine); } } } } Screenshoot :
  • 10. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 9 | P a g e No. 2) Database : MySQL LOGIN Source Code : 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 MySql.Data.MySqlClient; namespace UAS_no2 { public partial class Login : Form { public Login() { InitializeComponent(); txtPassword.PasswordChar = '*'; txtPassword.MaxLength = 9; } private void btnLogin_Click(object sender, EventArgs e) { try { string myConnection = "datasource=localhost;port=3306;username=root;password=";
  • 11. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 10 | P a g e MySqlConnection myConn = new MySqlConnection(myConnection); MySqlCommand SelectCommand = new MySqlCommand("select * from visual.login where username='" + this.txtUsername.Text + "' and password='" + this.txtPassword.Text + "' ;", myConn); MySqlDataReader myReader; myConn.Open(); myReader = SelectCommand.ExecuteReader(); int count = 0; while (myReader.Read()) { count = count + 1; } if (count == 1) { MessageBox.Show("Username dan password Anda benar"); this.Hide(); MenuUtama f2 = new MenuUtama(); f2.ShowDialog(); } else if (count > 1) { MessageBox.Show("Duplicate Username dan Password . . . Access denied"); } else { MessageBox.Show("Username dan password Anda Salah. . . Please try again !"); myConn.Close(); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void btnReset_Click(object sender, EventArgs e) { txtUsername.ResetText(); txtPassword.ResetText(); } private void Login_FormClosing(object sender, FormClosingEventArgs e) { DialogResult dialog = MessageBox.Show("Beneran sudah selesai nie ? hhe", "Exit", MessageBoxButtons.YesNo); if (dialog == DialogResult.Yes) { Application.Exit(); } else if (dialog == DialogResult.No)
  • 12. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 11 | P a g e { e.Cancel = true; } } } } Screenshoot : Setelah berhasil melakukan proses login, user akan langsung masuk ke Form Menu Utama, dimana pada form ini proses Insert, Update, Delete dan proses menampilkan data terjadi. Menu Utama Source Code : 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.IO; using MySql.Data.MySqlClient;
  • 13. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 12 | P a g e namespace UAS_no2 { public partial class MenuUtama : Form { public MenuUtama() { InitializeComponent(); fillCombo(); load_table(); Load_chart(); } string kelamin; void Load_chart() { string constring = "datasource=localhost;port=3306;username=root;password="; string lihat = "select * from visual.biodata;"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase); MySqlDataReader myReader; try { conDatabase.Open(); myReader = cmdLihat.ExecuteReader(); while (myReader.Read()) { this.chart1.Series["Umur"].Points.AddXY(myReader.GetString("fname"), myReader.GetString("Umur")); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } void fillCombo() { string constring = "datasource=localhost;port=3306;username=root;password="; string lihat = "select * from visual.biodata;"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase); MySqlDataReader myReader; try { conDatabase.Open(); myReader = cmdLihat.ExecuteReader();
  • 14. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 13 | P a g e while (myReader.Read()) { string sNama = myReader.GetString("fname"); comboBox1.Items.Add(sNama); } } catch (Exception ex) { MessageBox.Show(ex.Message); } } void load_table() { string constring = "datasource=localhost;port=3306;username=root;password="; string lihat = "select idbiodata as 'ID', fname as 'First Name', lname as 'Last Name', Umur, gender as 'Jenis Kelamin', tanggallahir as 'Tanggal Lahir' from visual.biodata;"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase); try { MySqlDataAdapter sda = new MySqlDataAdapter(); sda.SelectCommand = cmdLihat; DataTable dbdataset = new DataTable(); sda.Fill(dbdataset); BindingSource bSource = new BindingSource(); bSource.DataSource = dbdataset; dataGridView1.DataSource = bSource; sda.Update(dbdataset); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void btnSimpan_Click(object sender, EventArgs e) { byte[] imageBt= null; FileStream fstream = new FileStream(this.txtImage_loc.Text, FileMode.Open, FileAccess.Read); BinaryReader br = new BinaryReader(fstream); imageBt = br.ReadBytes((int)fstream.Length); string constring = "datasource=localhost;port=3306;username=root;password="; string insert = "insert into visual.biodata (idbiodata,fname,lname,umur,gender,tanggallahir,gambar)"+
  • 15. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 14 | P a g e "values('" + this.txtID.Text + "','" + this.txtFname.Text + "','" + this.txtLname.Text + "','" + this.txtUmur.Text + "','"+kelamin+"','"+this.dateTimePicker1.Text+"','"+this.pictureBox1+"');"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdInsert = new MySqlCommand(insert, conDatabase); MySqlDataReader MyReader; try{ conDatabase.Open(); //cmdInsert.Parameters.Add(new MySqlParameter("@IMG", imageBt)); MyReader = cmdInsert.ExecuteReader(); MessageBox.Show("Tersimpan"); }catch(Exception ex) { MessageBox.Show(ex.Message); } load_table(); //fillCombo(); } private void btnReset_Click(object sender, EventArgs e) { txtID.ResetText(); txtFname.ResetText(); txtLname.ResetText(); txtUmur.ResetText(); } private void btnEdit_Click(object sender, EventArgs e) { string constring = "datasource=localhost;port=3306;username=root;password="; string update = "update visual.biodata set idbiodata='" + this.txtID.Text + "',fname='" + this.txtFname.Text + "',lname='" + this.txtLname.Text + "',umur='" + this.txtUmur.Text + "',tanggallahir='"+this.dateTimePicker1.Text+"' where idbiodata='" + this.txtID.Text + "';"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdUpdate = new MySqlCommand(update, conDatabase); MySqlDataReader myReader; try { conDatabase.Open(); myReader = cmdUpdate.ExecuteReader(); MessageBox.Show("Ter-update"); } catch (Exception ex) { MessageBox.Show(ex.Message); } load_table();
  • 16. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 15 | P a g e fillCombo(); } private void btnHapus_Click(object sender, EventArgs e) { string constring = "datasource=localhost;port=3306;username=root;password="; string hapus = "delete from visual.biodata where idbiodata='" + this.txtID.Text + "';"; string lihat = "select * from visual.biodata"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdHapus = new MySqlCommand(hapus, conDatabase); MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase); MySqlDataReader myReader; try { conDatabase.Open(); myReader = cmdHapus.ExecuteReader(); MessageBox.Show("Terhapus"); } catch (Exception ex) { MessageBox.Show(ex.Message); } load_table(); //fillCombo(); } //private void button1_Click(object sender, EventArgs e) //{ //string namestr = txtFname.Text; //comboBox1.Items.Add(namestr); //} private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) { string constring = "datasource=localhost;port=3306;username=root;password="; string lihat = "select * from visual.biodata where fname='" + comboBox1.Text + "'"; MySqlConnection conDatabase = new MySqlConnection(constring); MySqlCommand cmdLihat = new MySqlCommand(lihat, conDatabase); MySqlDataReader myReader; try { conDatabase.Open(); myReader = cmdLihat.ExecuteReader(); while (myReader.Read()) { string sID = myReader.GetString("idbiodata"); string sFname = myReader.GetString("fname"); string sLname = myReader.GetString("lname");
  • 17. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 16 | P a g e string sUmur = myReader.GetString("umur"); txtID.Text = sID; txtFname.Text = sFname; txtLname.Text = sLname; txtUmur.Text = sUmur; //byte[] imgg = (byte[])(myReader["gambar"]); //if (imgg == null) //{ // pictureBox1.Image = null; // } // else // { // MemoryStream mStream = new MemoryStream(imgg); // pictureBox1.Image = System.Drawing.Image.FromStream(mStream); // } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { DataGridViewRow row = this.dataGridView1.Rows[e.RowIndex]; txtID.Text = row.Cells["ID"].Value.ToString(); txtFname.Text = row.Cells["First Name"].Value.ToString(); txtLname.Text = row.Cells["Last Name"].Value.ToString(); txtUmur.Text = row.Cells["Umur"].Value.ToString(); } } private void MenuUtama_FormClosing(object sender, FormClosingEventArgs e) { DialogResult dialog = MessageBox.Show("Beneran sudah selesai nie ? hhe", "Exit", MessageBoxButtons.YesNo); if (dialog == DialogResult.Yes) { Application.Exit(); } else if (dialog == DialogResult.No) { e.Cancel = true; } }
  • 18. [LAPORAN UAS PEMROGRAMAN VISUAL] Kamis, 20 Juni 2013 17 | P a g e private void rbtnLaki_CheckedChanged(object sender, EventArgs e) { kelamin = "Laki-laki"; } private void rbtnPerempuan_CheckedChanged(object sender, EventArgs e) { kelamin = "Perempuan"; } private void btnLoadChart_Click(object sender, EventArgs e) { Load_chart(); } private void button1_Click(object sender, EventArgs e) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Filter = "JPG Files(*.jpg)|*.jpg|PNG Files(*.png)|*.png"; dlg.Title = "Pilih Foto Diri"; if (dlg.ShowDialog() == DialogResult.OK) { string picloc = dlg.FileName.ToString(); txtImage_loc.Text = picloc; pictureBox1.ImageLocation = picloc; } } } } Screenshoot :