• Total Source Code 6
  • Total Page : 1
  • You currently on page number : 1

Reading From Database

  • 00 0000
  • 784
  • C#,code,program,icodeformoney

In this section, we still using the same database as the previous section which is created by the following queries: #Create database CREATE DATABASE IF NOT EXISTS campus; #Activate database USE campus; #Create table CREATE TABLE IF NOT EXISTS students ( id INT PRIMARY KEY AUTO_INCREMENT, fullname VARCHAR(100), gender VARCHAR(10), faculty VARCHAR(50), Read more

Database Connection

  • 00 0000
  • 792
  • C#,program,icodeformoney

To use database in C#, we must first connect to the database. To do that, we use a Connection object. In this case, we use MySqlConnection class. Basically, the code to connect to a database are:var conn = new MySqlConnection();conn.ConnectionString = "Server=localhost; Uid=root; Pwd=123; Port=3306;";conn.Open();//Do something to the Read more


  • 00 0000
  • 842
  • C#,program,icodeformoney

A variable is just a storage for data of values in the program. In programming world, every variables has a datatype and in most programming language, C# included, a variable's datatype is determined when the variable is declared or initialized. There are several ways to declare a variable: [data type] [identifier];[data type] [identifier] = [value];[data type] [identifier Read more

Money to Text

  • 21 December 2013
  • 206
  • money,text,spell

this is source code unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, Buttons, ExtCtrls; type TForm1 = class(TForm) Label2: TLabel; Edit1: TEdit; Panel1: TPanel; BitBtn1: TBitBtn; Label1: TLabel; procedure BitBtn1Click(Sender: TObject); procedure BitBtn2Click(Sender: Read more

Curreny Number Format

  • 16 January 2014
  • 230
  • money,currency,format

if you type 12345, it will be 12,345 unit u_main; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ComCtrls, ExtCtrls,ShellApi; type Tf_main = class(TForm) Edit1: TEdit; Label1: TLabel; Timer1: TTimer; procedure Edit1KeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); Read more

Change Number To Rupiah Format (Indonesian Currency)

  • 28 April 2014
  • 626
  • rupiah,currency format,money

Example Number is 1234567, ti will be change to Rp. 1.234.567,00 syntax : function ChangeToRupiah(angka){ var rev = parseInt(angka, 10).toString().split("").reverse().join(""); var rev2 = ""; for(var i = 0; i < rev.length; i++){ rev2 += rev[i]; if((i + 1) % 3 === 0 && i !== (rev.length - 1)){ rev2 += "."; } } return "Rp. " Read more