UAS DASKOMPROG

SYNTAX UNTUK FORM LOGIN

//---------------------------------------------------------------------------

#include
#pragma hdrstop

#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TPassword *Password;
//---------------------------------------------------------------------------
__fastcall TPassword::TPassword(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------

void __fastcall TPassword::Button1Click(TObject *Sender)
{
if (Edit1->Text=="1005347"&&Edit2->Text=="permatabiru")
{
Gaji->ShowModal();
}
else
{
ShowMessage("User Name dan Password Anda SALAH") ;
}
}
//---------------------------------------------------------------------------
void __fastcall TPassword::Button2Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------



SYNTAX UNTUK FORM STRUK GAJI

//---------------------------------------------------------------------------

#include
#pragma hdrstop
#include
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "CSPIN"
#pragma resource "*.dfm"
TGaji *Gaji;
//---------------------------------------------------------------------------
__fastcall TGaji::TGaji(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TGaji::Button3Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------


void __fastcall TGaji::ComboBox1Change(TObject *Sender)
{
if(ComboBox1->Text == "192346126")
{
Edit2->Text = "ERIK ADI SUBAGJA" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "193212121")
{
Edit2->Text = "ANDRI RAHMAT" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "193464654")
{
Edit2->Text = "CEPY DARMAWAN" ;
Edit4->Text = 2500000;
Edit6->Text = 50000;
Edit7->Text = 100000;
Edit8->Text = 250000;
Edit9->Text = 100000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "193465215")
{
Edit2->Text = "SIDIQ FAIZAL HAKIM" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "194563248")
{
Edit2->Text = "QISTHY ARIFAH" ;
Edit4->Text = 2500000;
Edit6->Text = 50000;
Edit7->Text = 100000;
Edit8->Text = 250000;
Edit9->Text = 100000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "195346266")
{
Edit2->Text = "YESAYA MARITO" ;
Edit4->Text = 2500000;
Edit6->Text = 50000;
Edit7->Text = 100000;
Edit8->Text = 250000;
Edit9->Text = 100000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "195885513")
{
Edit2->Text = "WILLY WIGIA SOFYAN" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "196251646")
{
Edit2->Text = "YUNENGSIH" ;
Edit4->Text = 2500000;
Edit6->Text = 50000;
Edit7->Text = 100000;
Edit8->Text = 250000;
Edit9->Text = 100000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "197831546")
{
Edit2->Text = "NASIHUN AMIN" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "197846651")
{
Edit2->Text = "MAY TRISNO SABDA" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "197854653")
{
Edit2->Text = "NAFIDH ANWAR" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "198465115")
{
Edit2->Text = "JALALUDDIN KURNIA ILMA" ;
Edit4->Text = 2500000;
Edit6->Text = 50000;
Edit7->Text = 100000;
Edit8->Text = 250000;
Edit9->Text = 100000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "198648984")
{
Edit2->Text = "NOVFIAN FARHAN FAUZAN" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "199652625")
{
Edit2->Text = "HARYAWAN" ;
Edit4->Text = 1500000;
Edit6->Text = 25000;
Edit7->Text = 75000;
Edit8->Text = 150000;
Edit9->Text = 75000;
Edit11->Text = 50000;
}
if(ComboBox1->Text == "199789663")
{
Edit2->Text = "HADIAN JAYADILAGA" ;
Edit4->Text = 2500000;
Edit6->Text = 50000;
Edit7->Text = 100000;
Edit8->Text = 250000;
Edit9->Text = 100000;
Edit11->Text = 50000;
}
}
//---------------------------------------------------------------------------

void __fastcall TGaji::CSpinEdit1Change(TObject *Sender)
{
float lembur;
lembur = StrToInt(CSpinEdit1->Text) * 35000;
Edit5->Text = lembur ;
}
//---------------------------------------------------------------------------




void __fastcall TGaji::Button2Click(TObject *Sender)
{
float jumlah, pajak, potongan, total;
jumlah = StrToInt(Edit4->Text) + StrToInt(Edit5->Text) + StrToInt(Edit6->Text) + StrToInt(Edit7->Text) + StrToInt(Edit8->Text) + StrToInt(Edit9->Text) ;
Edit12->Text = jumlah;

pajak = StrToInt(Edit12->Text)* 0.1;
Edit10->Text = pajak;

potongan = StrToInt(Edit11->Text) + pajak;
Edit13->Text = potongan;

total = jumlah - potongan;
Edit14->Text = total;

}
//---------------------------------------------------------------------------


void __fastcall TGaji::Button1Click(TObject *Sender)
{

if (!PrintDialog1->Execute())
return;

Printer()->BeginDoc();

Printer()->EndDoc();

}
//---------------------------------------------------------------------------



  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS