Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
* Created by SharpDevelop.
* User: Lenovo
* Date: 07-May-19
* Time: 9:43 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
*/
using System;
using System.Drawing;
using System.Windows.Forms;
namespace praktikum6a
{
/// <summary>
/// Description of FormInputPegawai.
/// </summary>
public partial class FormInputPegawai : Form
{
string gol, nmGol, status;
double gapok, tIstri, tAnak, gaber, jAnak;
public FormInputPegawai()
{
//
// The InitializeComponent() call is required for Windows Forms
designer support.
//
InitializeComponent();
isicomboBox();
enabledObject();
comboBox1.SelectedIndex=0;
//
// TODO: Add constructor code after the InitializeComponent()
call.
//
}
void isicomboBox()
{
comboBox1.Items.Add("3A");
comboBox1.Items.Add("3B");
comboBox1.Items.Add("3C");
comboBox1.Items.Add("3D");
}
void enabledObject()
{
textBox3.Enabled=false;
textBox4.Enabled=false;
textBox5.Enabled=false;
textBox6.Enabled=false;
textBox7.Enabled=false;
button1.Enabled=false;
button2.Enabled=false;
}
void hitung(object sender, EventArgs e)
{
gapok=double.Parse(textBox3.Text);
tIstri=double.Parse(textBox4.Text);
tAnak=double.Parse(textBox5.Text);
textBox6.Text=Convert.ToString(gaber);
button1.Enabled=true;
}
button2.Enabled=true;
}
void status(object sender, EventArgs e)
{
if(radioButton1.Checked)
{
label1.Text="Status : Kawin\n";
}
if(radioButton2.Checked)
{
label1.Text="Status : Belum Kawin\n";
}
}
}
void exit(object sender, EventArgs e)
{
this.Close();
}
void gantiPilihan(object sender, EventArgs e)
{
gol=Convert.ToString(comboBox1.SelectedItem);
if(gol=="3A")
{
nmGol="Penata";
gapok=1000000;
textBox7.Text=nmGol;
textBox3.Text=Convert.ToDouble(gapok);
}
if(gol=="3B")
{
nmGol="Penata Muda";
gapok=2000000;
textBox7.Text=nmGol;
textBox3.Text=Convert.ToDouble(gapok);
}
if(gol=="3C")
{
nmGol="Pembina";
gapok=3000000;
textBox7.Text=nmGol;
textBox3.Text=Convert.ToDouble(gapok);
}
if(gol=="3D")
{
nmGol="Pembina Muda";
gapok=4000000;
textBox7.Text=nmGol;
textBox3.Text=Convert.ToDouble(gapok);
}
}
}