SlideShare a Scribd company logo
1 of 18
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 SERVERDarwin Durand
 
Sistema de ventas
Sistema de ventasSistema de ventas
Sistema de ventasDAYANA RETO
 
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 programsKaruppaiyaa123
 
Михаил Матросов, Повседневный С++: boost и STL
Михаил Матросов, Повседневный С++: boost и STLМихаил Матросов, Повседневный С++: boost и STL
Михаил Матросов, Повседневный С++: boost и STLSergey 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 185Mahmoud Samir Fayed
 
4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message Brokers4Developers: Dominik Przybysz- Message Brokers
4Developers: Dominik Przybysz- Message BrokersPROIDEA
 
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 itPROIDEA
 
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 JavaScriptsAnton 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 30Mahmoud Samir Fayed
 
Dive into kotlins coroutines
Dive into kotlins coroutinesDive into kotlins coroutines
Dive into kotlins coroutinesFreddie Wang
 

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 - PHPDudy 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 PemulaAgus Kurniawan
 
Pengantar XML
Pengantar XMLPengantar XML
Pengantar XMLDudy Ali
 
Network Socket Programming with JAVA
Network Socket Programming with JAVANetwork Socket Programming with JAVA
Network Socket Programming with JAVADudy 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 KeamananDudy 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 DatabaseDudy 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 EkstranetDudy Ali
 
Review Materi ASP.NET
Review Materi ASP.NETReview Materi ASP.NET
Review Materi ASP.NETDudy Ali
 
XML Schema Part 2
XML Schema Part 2XML Schema Part 2
XML Schema Part 2Dudy Ali
 
XML Schema Part 1
XML Schema Part 1XML Schema Part 1
XML Schema Part 1Dudy Ali
 
Information System Security - Serangan dan Pengawasan
Information System Security - Serangan dan PengawasanInformation System Security - Serangan dan Pengawasan
Information System Security - Serangan dan PengawasanDudy Ali
 
Object Oriented Programming - Introduction
Object Oriented Programming - IntroductionObject Oriented Programming - Introduction
Object Oriented Programming - IntroductionDudy 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 everyoneBartek 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
 
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) Datagreenwop
 
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 JavaPokequesthero
 
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 LabsAlfonso Peletier
 
2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good Tests2012 JDays Bad Tests Good Tests
2012 JDays Bad Tests Good TestsTomek Kaczanowski
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to JavascriptAnjan 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 beginnersishan0019
 

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 (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

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceSamikshaHamane
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4MiaBumagat1
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...JhezDiaz1
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Celine George
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 

Recently uploaded (20)

Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
Roles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in PharmacovigilanceRoles & Responsibilities in Pharmacovigilance
Roles & Responsibilities in Pharmacovigilance
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4ANG SEKTOR NG agrikultura.pptx QUARTER 4
ANG SEKTOR NG agrikultura.pptx QUARTER 4
 
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
ENGLISH 7_Q4_LESSON 2_ Employing a Variety of Strategies for Effective Interp...
 
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
Incoming and Outgoing Shipments in 3 STEPS Using Odoo 17
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 

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 :