MULTIPLE BANKING ALLOWS CLIENT TO TRANSFER MONEY FROM ONE BANK TO ANOTHER BANKING IN ONLINE
THIS COMPLETE PROJECT IS DONE IN C# AND MICROSOFT SQL SERVER
REQUIREMENTS TO RUN THIS PROJECT
*VISUAL STUDIO 2005
*MICROSOFT SQL SERVER
*IIS
*MICROSOFT WINDOWS XP /VISTA/WINDOWS 7
TO DOWNLOAD THIS PROJECT CLICK HERE
THIS PROJECT HAVE SEVERAL MODULES
"ACCOUNTCREATION.CS"
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data.Sql;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace bankingproject1
{
public partial class createaccount : Form
{
public createaccount()
{
InitializeComponent();
}
public void clear()
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
textBox6.Clear();
textBox7.Clear();
textBox8.Clear();
radioButton1.Checked = false;
radioButton2.Checked = false;
textBox1.Focus();
}
public void createaccounttype()
{
SqlConnection cn = new SqlConnection("database=HOME1;Integrated Security=True;server=.;uid=sa");
cn.Open();
int j;
string gender;
if (radioButton1.Checked == true)
gender = "male";
else
gender = "female";
SqlCommand cmd = new SqlCommand("select * from bankinfo", cn);
cmd.Connection = cn;
cmd.CommandText = "insert into bankinfo values ('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','" + gender + "','" + textBox6.Text + "','" + textBox7.Text + "','" + textBox8.Text + "','" + comboBox1.Text + "')";
j = cmd.ExecuteNonQuery();
cn.Close();
MessageBox.Show("Account Created Successfully");
}
private void button2_Click(object sender, EventArgs e)
{
}
private void createaccount_Load(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
createaccounttype();
}
private void button3_Click(object sender, EventArgs e)
{
}
private void button2_Click_1(object sender, EventArgs e)
{
clear();
}
private void button3_Click_1(object sender, EventArgs e)
{
this.Close();
}
}
}
"ACCOUNTCREATION.DESIGNER.CS"
namespace bankingproject1
{
partial class createaccount
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.textBox8 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.label10 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(128, 56);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 13);
this.label1.TabIndex = 0;
this.label1.Text = "ACCOUNTNO";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(291, 53);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(236, 20);
this.textBox1.TabIndex = 1;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(128, 103);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(42, 13);
this.label2.TabIndex = 2;
this.label2.Text = "NAME";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(291, 96);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(236, 20);
this.textBox2.TabIndex = 3;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(128, 156);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(57, 13);
this.label3.TabIndex = 4;
this.label3.Text = "ADRESS";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(291, 139);
this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(236, 66);
this.textBox3.TabIndex = 5;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(128, 237);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(103, 13);
this.label4.TabIndex = 6;
this.label4.Text = "PHONENUMBER";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(291, 237);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(236, 20);
this.textBox4.TabIndex = 7;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(128, 304);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(32, 13);
this.label5.TabIndex = 8;
this.label5.Text = "AGE";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(128, 351);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 13);
this.label6.TabIndex = 9;
this.label6.Text = "GENDER";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(128, 409);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(87, 13);
this.label7.TabIndex = 10;
this.label7.Text = "OCCUPATION";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label8.Location = new System.Drawing.Point(128, 455);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(105, 13);
this.label8.TabIndex = 11;
this.label8.Text = "ANNUALINCOME";
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(113, 501);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(135, 13);
this.label9.TabIndex = 12;
this.label9.Text = "STATEMENTAMOUNT";
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(291, 297);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(236, 20);
this.textBox5.TabIndex = 13;
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(291, 402);
this.textBox6.Name = "textBox6";
this.textBox6.Size = new System.Drawing.Size(236, 20);
this.textBox6.TabIndex = 14;
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(291, 452);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(236, 20);
this.textBox7.TabIndex = 15;
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(291, 494);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(236, 20);
this.textBox8.TabIndex = 16;
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(241, 548);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 17;
this.button1.Text = "CREATE";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(335, 548);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 18;
this.button2.Text = "RESET";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// button3
//
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button3.Location = new System.Drawing.Point(432, 548);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 19;
this.button3.Text = "EXIT";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click_1);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.radioButton1.Location = new System.Drawing.Point(308, 346);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(58, 17);
this.radioButton1.TabIndex = 20;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "MALE";
this.radioButton1.UseVisualStyleBackColor = true;
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.radioButton2.Location = new System.Drawing.Point(434, 346);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(73, 17);
this.radioButton2.TabIndex = 21;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "FEMALE";
this.radioButton2.UseVisualStyleBackColor = true;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label10.Location = new System.Drawing.Point(128, 9);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(120, 13);
this.label10.TabIndex = 22;
this.label10.Text = "SELECT THE BANK";
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"State Bank Of India",
"State Bank Of Hyderabad",
"State Bank Of Mysore"});
this.comboBox1.Location = new System.Drawing.Point(291, 9);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(236, 21);
this.comboBox1.TabIndex = 23;
//
// createaccount
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(817, 583);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.label10);
this.Controls.Add(this.radioButton2);
this.Controls.Add(this.radioButton1);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox8);
this.Controls.Add(this.textBox7);
this.Controls.Add(this.textBox6);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.label9);
this.Controls.Add(this.label8);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.label4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.label3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Name = "createaccount";
this.Text = "CREATE ACCOUNT";
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
this.Load += new System.EventHandler(this.createaccount_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.ComboBox comboBox1;
}
}
"CREDIT.CS"
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
//using System.Linq;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
namespace bankingproject1
{
public partial class credit : Form
{
public void clear()
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox1.Focus();
}
public credit()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void credit_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
int accno = System.Convert.ToInt32(textBox1.Text);
string sql = "select statementamount from bankinfo where accountno='" + textBox1.Text + "'";
SqlConnection cn = new SqlConnection("database=HOME1;Integrated Security=True;server=.;uid=sa");
SqlCommand cmd = new SqlCommand(sql, cn);
cn.Open();
accno = int.Parse(cmd.ExecuteScalar().ToString());
if (accno > 1000)
{
int j;
SqlTransaction trans;
SqlCommand cmd1 = new SqlCommand();
trans = cn.BeginTransaction();
cmd1.Connection = cn;
cmd1.Transaction = trans;
cmd1.CommandType = CommandType.Text;
cmd1.CommandText = "update bankinfo set statementamount=statementamount-'" + textBox3.Text + "' where accountno='" + textBox1.Text + "' and name='" + textBox2.Text + "'";
j = cmd1.ExecuteNonQuery();
if (j == 1)
{
trans.Commit();
MessageBox.Show("credited...");
clear();
}
else
trans.Rollback();
}
else
{
MessageBox.Show("u can't make credit...");
}
}
private void button2_Click_1(object sender, EventArgs e)
{
this.Close();
}
}
}
"CREDIT.DESIGNER.CS"
namespace bankingproject1
{
partial class credit
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(13, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 13);
this.label1.TabIndex = 0;
this.label1.Text = "ACCOUNTNO";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(13, 76);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(42, 13);
this.label2.TabIndex = 1;
this.label2.Text = "NAME";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(13, 124);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(60, 13);
this.label3.TabIndex = 2;
this.label3.Text = "AMOUNT";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(161, 32);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(175, 20);
this.textBox1.TabIndex = 3;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(161, 76);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(175, 20);
this.textBox2.TabIndex = 4;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(161, 121);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(175, 20);
this.textBox3.TabIndex = 5;
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(107, 174);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 6;
this.button1.Text = "CREDIT";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(210, 173);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 7;
this.button2.Text = "CANCEL";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// credit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(357, 241);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "credit";
this.Text = "credit";
this.Load += new System.EventHandler(this.credit_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}
"DEBIT.CS"
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.Data.SqlClient;
namespace bankingproject1
{
public partial class debit : Form
{
public debit()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void debit_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
int a = System.Convert.ToInt32(textBox1.Text);
int j;
SqlConnection cn = new SqlConnection("database=HOME1;Integrated Security=True;server=.;uid=sa");
SqlCommand cmd = new SqlCommand("select * from bankinfo", cn);
SqlTransaction trans;
cn.Open();
trans = cn.BeginTransaction();
cmd.Connection = cn;
cmd.Transaction = trans;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "update bankinfo set statementamount=statementamount + '" + textBox3.Text + "' where accountno='" + textBox1.Text + "' and name='" + textBox2.Text + "'";
j = cmd.ExecuteNonQuery();
if (j == 1)
{
trans.Commit();
MessageBox.Show("amount is debited....");
}
else
trans.Rollback();
}
private void button2_Click_1(object sender, EventArgs e)
{
this.Close();
}
}
}
"DEBIT.DESIGNER.CS"
namespace bankingproject1
{
partial class debit
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(249, 195);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 15;
this.button2.Text = "CANCEL";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(146, 196);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 14;
this.button1.Text = "DEBIT";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(200, 143);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(175, 20);
this.textBox3.TabIndex = 13;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(200, 98);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(175, 20);
this.textBox2.TabIndex = 12;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(200, 54);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(175, 20);
this.textBox1.TabIndex = 11;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(52, 146);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(60, 13);
this.label3.TabIndex = 10;
this.label3.Text = "AMOUNT";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(52, 98);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(42, 13);
this.label2.TabIndex = 9;
this.label2.Text = "NAME";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(52, 54);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 13);
this.label1.TabIndex = 8;
this.label1.Text = "ACCOUNTNO";
//
// debit
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(395, 273);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "debit";
this.Text = "debit";
this.Load += new System.EventHandler(this.debit_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
}
}
"EDULOAN.CS"
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.Data.SqlClient;
namespace bankingproject1
{
public partial class eduloan : Form
{
public void clear()
{
textBox1.Clear();
textBox10.Clear();
textBox11.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
textBox6.Clear();
textBox7.Clear();
textBox8.Clear();
textBox9.Clear();
radioButton1.Checked = false;
radioButton2.Checked = false;
radioButton3.Checked = false;
}
public eduloan()
{
InitializeComponent();
}
private void button3_Click(object sender, EventArgs e)
{
clear();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
SqlConnection cn = new SqlConnection("database=HOME1;Integrated Security=True;server=.;uid=sa");
string sql = "select name,address,phoneno,age,gender from bankinfo where accountno='" + textBox1.Text + "'";
SqlCommand cmd = new SqlCommand(sql, cn);
if (cn.State == ConnectionState.Closed)
cn.Open();
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
textBox2.Text = dr.GetValue(0).ToString();
textBox3.Text = dr.GetValue(1).ToString();
textBox4.Text = dr.GetValue(2).ToString();
textBox5.Text = dr.GetValue(3).ToString();
textBox6.Text = dr.GetValue(4).ToString();
}
else
{
clear();
}
}
private void button2_Click(object sender, EventArgs e)
{
emicalculator ec = new emicalculator();
ec.Show();
}
private void button1_Click(object sender, EventArgs e)
{
string loanfor = "";
if (radioButton3.Checked == true)
loanfor = "pg";
if (radioButton2.Checked == true)
loanfor = "graduation";
if (radioButton1.Checked == true)
loanfor = "ug";
SqlConnection cn = new SqlConnection("Data Source=HOME1;Integrated Security=True;server=.;uid=sa");
string s1 = "insert into education values ('" + textBox11.Text + "','" + textBox7.Text + "', '" + textBox8.Text + "','" + loanfor + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "')";
SqlCommand cmd = new SqlCommand(s1, cn);
if (cn.State == ConnectionState.Closed)
cn.Open();
int j = cmd.ExecuteNonQuery();
if (j == 1)
MessageBox.Show("loan sanctioned..");
else
MessageBox.Show("no credentials satisfied");
}
private void textBox9_TextChanged(object sender, EventArgs e)
{
}
private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked == true)
{
label10.Visible = true;
label11.Visible = true;
textBox9.Visible = true;
}
}
private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked == true)
{
label10.Visible = true;
label11.Visible = true;
textBox9.Visible = true;
label12.Visible = true;
textBox10.Visible = true;
}
}
private void radioButton3_CheckedChanged(object sender, EventArgs e)
{
if (radioButton3.Checked == true)
{
label10.Visible = true;
label11.Visible = true;
textBox9.Visible = true;
label12.Visible = true;
textBox10.Visible = true;
label13.Visible = true;
textBox11.Visible = true;
}
}
private void eduloan_Load(object sender, EventArgs e)
{
}
}
}
"EDULOAN.DESIGNER.CS"
namespace bankingproject1
{
partial class eduloan
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.label13 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.textBox11 = new System.Windows.Forms.TextBox();
this.textBox10 = new System.Windows.Forms.TextBox();
this.textBox9 = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.radioButton3 = new System.Windows.Forms.RadioButton();
this.radioButton2 = new System.Windows.Forms.RadioButton();
this.radioButton1 = new System.Windows.Forms.RadioButton();
this.textBox8 = new System.Windows.Forms.TextBox();
this.textBox7 = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label9 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.label6 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.textBox6 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.button3 = new System.Windows.Forms.Button();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox2
//
this.groupBox2.Controls.Add(this.label13);
this.groupBox2.Controls.Add(this.label12);
this.groupBox2.Controls.Add(this.textBox11);
this.groupBox2.Controls.Add(this.textBox10);
this.groupBox2.Controls.Add(this.textBox9);
this.groupBox2.Controls.Add(this.label11);
this.groupBox2.Controls.Add(this.radioButton3);
this.groupBox2.Controls.Add(this.radioButton2);
this.groupBox2.Controls.Add(this.radioButton1);
this.groupBox2.Controls.Add(this.textBox8);
this.groupBox2.Controls.Add(this.textBox7);
this.groupBox2.Controls.Add(this.label10);
this.groupBox2.Controls.Add(this.label9);
this.groupBox2.Controls.Add(this.label8);
this.groupBox2.Controls.Add(this.label7);
this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(327, 29);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(283, 363);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "EDUCATIONALDETAILS";
//
// label13
//
this.label13.AutoSize = true;
this.label13.Location = new System.Drawing.Point(65, 325);
this.label13.Name = "label13";
this.label13.Size = new System.Drawing.Size(58, 13);
this.label13.TabIndex = 14;
this.label13.Text = "DEGREE";
this.label13.Visible = false;
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(81, 288);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(45, 13);
this.label12.TabIndex = 13;
this.label12.Text = "INTER";
this.label12.Visible = false;
//
// textBox11
//
this.textBox11.Location = new System.Drawing.Point(132, 318);
this.textBox11.Name = "textBox11";
this.textBox11.Size = new System.Drawing.Size(127, 20);
this.textBox11.TabIndex = 12;
this.textBox11.Visible = false;
//
// textBox10
//
this.textBox10.Location = new System.Drawing.Point(132, 285);
this.textBox10.Name = "textBox10";
this.textBox10.Size = new System.Drawing.Size(127, 20);
this.textBox10.TabIndex = 2;
this.textBox10.Visible = false;
//
// textBox9
//
this.textBox9.Location = new System.Drawing.Point(129, 246);
this.textBox9.Name = "textBox9";
this.textBox9.Size = new System.Drawing.Size(127, 20);
this.textBox9.TabIndex = 11;
this.textBox9.Visible = false;
this.textBox9.TextChanged += new System.EventHandler(this.textBox9_TextChanged);
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(92, 253);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(31, 13);
this.label11.TabIndex = 10;
this.label11.Text = "SSC";
this.label11.Visible = false;
//
// radioButton3
//
this.radioButton3.AutoSize = true;
this.radioButton3.Location = new System.Drawing.Point(135, 200);
this.radioButton3.Name = "radioButton3";
this.radioButton3.Size = new System.Drawing.Size(42, 17);
this.radioButton3.TabIndex = 9;
this.radioButton3.TabStop = true;
this.radioButton3.Text = "PG";
this.radioButton3.UseVisualStyleBackColor = true;
this.radioButton3.CheckedChanged += new System.EventHandler(this.radioButton3_CheckedChanged);
//
// radioButton2
//
this.radioButton2.AutoSize = true;
this.radioButton2.Location = new System.Drawing.Point(134, 167);
this.radioButton2.Name = "radioButton2";
this.radioButton2.Size = new System.Drawing.Size(107, 17);
this.radioButton2.TabIndex = 8;
this.radioButton2.TabStop = true;
this.radioButton2.Text = "GRADUATION";
this.radioButton2.UseVisualStyleBackColor = true;
this.radioButton2.CheckedChanged += new System.EventHandler(this.radioButton2_CheckedChanged);
//
// radioButton1
//
this.radioButton1.AutoSize = true;
this.radioButton1.Location = new System.Drawing.Point(134, 140);
this.radioButton1.Name = "radioButton1";
this.radioButton1.Size = new System.Drawing.Size(43, 17);
this.radioButton1.TabIndex = 7;
this.radioButton1.TabStop = true;
this.radioButton1.Text = "UG";
this.radioButton1.UseVisualStyleBackColor = true;
this.radioButton1.CheckedChanged += new System.EventHandler(this.radioButton1_CheckedChanged);
//
// textBox8
//
this.textBox8.Location = new System.Drawing.Point(132, 91);
this.textBox8.Name = "textBox8";
this.textBox8.Size = new System.Drawing.Size(124, 20);
this.textBox8.TabIndex = 6;
//
// textBox7
//
this.textBox7.Location = new System.Drawing.Point(134, 45);
this.textBox7.Name = "textBox7";
this.textBox7.Size = new System.Drawing.Size(122, 20);
this.textBox7.TabIndex = 5;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label10.Location = new System.Drawing.Point(6, 220);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(117, 13);
this.label10.TabIndex = 4;
this.label10.Text = "MARKS OBTAINED";
this.label10.Visible = false;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label9.Location = new System.Drawing.Point(15, 145);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(73, 13);
this.label9.TabIndex = 3;
this.label9.Text = "LOAN FOR ";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label8.Location = new System.Drawing.Point(15, 98);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(69, 13);
this.label8.TabIndex = 2;
this.label8.Text = "LOCATION";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label7.Location = new System.Drawing.Point(6, 48);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(122, 13);
this.label7.TabIndex = 1;
this.label7.Text = "INSTITUTIONNAME";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(7, 48);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 13);
this.label1.TabIndex = 0;
this.label1.Text = "ACCOUNTNO";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(111, 48);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(166, 20);
this.textBox1.TabIndex = 1;
this.textBox1.TextChanged += new System.EventHandler(this.textBox1_TextChanged);
//
// groupBox1
//
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.textBox6);
this.groupBox1.Controls.Add(this.textBox5);
this.groupBox1.Controls.Add(this.textBox4);
this.groupBox1.Controls.Add(this.label4);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(12, 29);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(283, 363);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "PERSONALDETAILS";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.Location = new System.Drawing.Point(6, 321);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 13);
this.label6.TabIndex = 11;
this.label6.Text = "GENDER";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label5.Location = new System.Drawing.Point(7, 276);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(32, 13);
this.label5.TabIndex = 10;
this.label5.Text = "AGE";
//
// textBox6
//
this.textBox6.Location = new System.Drawing.Point(111, 314);
this.textBox6.Name = "textBox6";
this.textBox6.ReadOnly = true;
this.textBox6.Size = new System.Drawing.Size(166, 20);
this.textBox6.TabIndex = 9;
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(111, 269);
this.textBox5.Name = "textBox5";
this.textBox5.ReadOnly = true;
this.textBox5.Size = new System.Drawing.Size(166, 20);
this.textBox5.TabIndex = 8;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(111, 220);
this.textBox4.Name = "textBox4";
this.textBox4.ReadOnly = true;
this.textBox4.Size = new System.Drawing.Size(166, 20);
this.textBox4.TabIndex = 7;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(7, 220);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(68, 13);
this.label4.TabIndex = 6;
this.label4.Text = "PHONENO";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(6, 167);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(66, 13);
this.label3.TabIndex = 5;
this.label3.Text = "ADDRESS";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(111, 142);
this.textBox3.Multiline = true;
this.textBox3.Name = "textBox3";
this.textBox3.ReadOnly = true;
this.textBox3.Size = new System.Drawing.Size(166, 58);
this.textBox3.TabIndex = 4;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(111, 98);
this.textBox2.Name = "textBox2";
this.textBox2.ReadOnly = true;
this.textBox2.Size = new System.Drawing.Size(166, 20);
this.textBox2.TabIndex = 3;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(7, 105);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(42, 13);
this.label2.TabIndex = 2;
this.label2.Text = "NAME";
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(147, 429);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 2;
this.button1.Text = "APPLY";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(249, 429);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 3;
this.button2.Text = "EMI";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click);
//
// button3
//
this.button3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button3.Location = new System.Drawing.Point(345, 429);
this.button3.Name = "button3";
this.button3.Size = new System.Drawing.Size(75, 23);
this.button3.TabIndex = 4;
this.button3.Text = "RESET";
this.button3.UseVisualStyleBackColor = true;
this.button3.Click += new System.EventHandler(this.button3_Click);
//
// eduloan
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(637, 497);
this.Controls.Add(this.button3);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "eduloan";
this.Text = "eduloan";
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox textBox6;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox11;
private System.Windows.Forms.TextBox textBox10;
private System.Windows.Forms.TextBox textBox9;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.RadioButton radioButton3;
private System.Windows.Forms.RadioButton radioButton2;
private System.Windows.Forms.RadioButton radioButton1;
private System.Windows.Forms.TextBox textBox8;
private System.Windows.Forms.TextBox textBox7;
private System.Windows.Forms.Label label13;
private System.Windows.Forms.Label label12;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button3;
}
}
"HOUSELOAN.CS"
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.Data.SqlClient;
namespace bankingproject1
{
public partial class houseloan : Form
{
public houseloan()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
}
private void button1_Click(object sender, EventArgs e)
{
}
private void houseloan_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
emicalculator ec = new emicalculator();
ec.Show();
}
private void button2_Click_1(object sender, EventArgs e)
{
int i = 1500000;
int loanamount = System.Convert.ToInt32(textBox3.Text);
SqlConnection cn = new SqlConnection("database=HOME1;Integrated Security=True;server=.;uid=sa");
if (loanamount <>
{
string sql = "insert into houseloan values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')";
SqlCommand cmd = new SqlCommand(sql, cn);
if (cn.State == ConnectionState.Closed)
cn.Open();
int z = cmd.ExecuteNonQuery();
if (z == 1)
MessageBox.Show("HOUSE LOAN IS SANCTIONED......");
else
MessageBox.Show("PLZ !!! ENTER CORRECT DETAILS...");
}
else
{
MessageBox.Show("The amount is too high to be snactioned...");
}
}
}
}
"HOUSELOAN.DESIGNER.CS"
namespace bankingproject1
{
partial class houseloan
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(145, 63);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(110, 17);
this.label1.TabIndex = 0;
this.label1.Text = "ACCOUNT NO";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(145, 120);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(51, 17);
this.label2.TabIndex = 1;
this.label2.Text = "NAME";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(145, 180);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(116, 17);
this.label3.TabIndex = 2;
this.label3.Text = "LOANAMOUNT";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label4.Location = new System.Drawing.Point(145, 244);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(148, 17);
this.label4.TabIndex = 3;
this.label4.Text = "MONTHLY SALARY";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(373, 63);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(217, 20);
this.textBox1.TabIndex = 4;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(373, 120);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(217, 20);
this.textBox2.TabIndex = 5;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(373, 180);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(217, 20);
this.textBox3.TabIndex = 6;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(382, 244);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(208, 20);
this.textBox4.TabIndex = 7;
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(295, 312);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(75, 23);
this.button1.TabIndex = 8;
this.button1.Text = "EMI";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(413, 312);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 9;
this.button2.Text = "SUBMIT";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// houseloan
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.GradientInactiveCaption;
this.ClientSize = new System.Drawing.Size(639, 384);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Name = "houseloan";
this.Text = "houseloan";
this.Load += new System.EventHandler(this.houseloan_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
}
}
"TRANSACTION.CS"
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.Data.SqlClient;
namespace bankingproject1
{
public partial class transaction : Form
{
public transaction()
{
InitializeComponent();
}
private void button2_Click(object sender, EventArgs e)
{
}
public void clear()
{
textBox1.Clear();
textBox2.Clear();
textBox3.Clear();
textBox4.Clear();
textBox5.Clear();
textBox1.Focus();
}
private void button1_Click(object sender, EventArgs e)
{
}
private void transaction_Load(object sender, EventArgs e)
{
}
private void button1_Click_1(object sender, EventArgs e)
{
int amount;
SqlConnection cn = new SqlConnection("database=HOME1;Integrated Security=True;server=.;uid=sa");
string sql = "select statementamount from bankinfo where accountno='" + textBox1.Text + "'";
SqlCommand cmd = new SqlCommand(sql, cn);
if (cn.State == ConnectionState.Closed)
cn.Open();
amount = int.Parse(cmd.ExecuteScalar().ToString());
if (amount > 1000)
{
int b;
int b1;
SqlCommand cmd1 = new SqlCommand();
SqlTransaction trans;
if (cn.State == ConnectionState.Closed)
cn.Open();
trans = cn.BeginTransaction();
cmd1.Connection = cn;
cmd1.CommandType = CommandType.Text;
cmd1.Transaction = trans;
cmd1.CommandText = "update bankinfo set statementamount=statementamount-'" + textBox3.Text + "' where accountno='" + textBox1.Text + "' and name='" + textBox2.Text + "'";
b = cmd1.ExecuteNonQuery();
cmd1.CommandText = "update bankinfo set statementamount=statementamount+'" + textBox3.Text + "' where accountno='" + textBox5.Text + "' and name='" + textBox4.Text + "'";
b1 = cmd1.ExecuteNonQuery();
if (b == 1 && b1 == 1)
{
trans.Commit();
MessageBox.Show("Money transfered");
clear();
}
else
trans.Rollback();
}
else
MessageBox.Show("no minimum amount to transfer.....");
}
private void button2_Click_1(object sender, EventArgs e)
{
this.Close();
}
}
}
"TRANSACTION.DESINGER.CS"
namespace bankingproject1
{
partial class transaction
{
///
/// Required designer variable.
///
private System.ComponentModel.IContainer components = null;
///
/// Clean up any resources being used.
///
/// true if managed resources should be disposed; otherwise, false.
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.button1 = new System.Windows.Forms.Button();
this.button2 = new System.Windows.Forms.Button();
this.label6 = new System.Windows.Forms.Label();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.textBox3);
this.groupBox1.Controls.Add(this.textBox2);
this.groupBox1.Controls.Add(this.textBox1);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox1.Location = new System.Drawing.Point(36, 62);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(300, 184);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "TRASFER FROM";
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(137, 128);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(157, 20);
this.textBox3.TabIndex = 5;
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(137, 85);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(157, 20);
this.textBox2.TabIndex = 4;
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(137, 35);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(157, 20);
this.textBox1.TabIndex = 3;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(19, 128);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(60, 13);
this.label3.TabIndex = 2;
this.label3.Text = "AMOUNT";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(16, 88);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(42, 13);
this.label2.TabIndex = 1;
this.label2.Text = "NAME";
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(16, 43);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(84, 13);
this.label1.TabIndex = 0;
this.label1.Text = "ACCOUNTNO";
//
// groupBox2
//
this.groupBox2.Controls.Add(this.textBox4);
this.groupBox2.Controls.Add(this.textBox5);
this.groupBox2.Controls.Add(this.label4);
this.groupBox2.Controls.Add(this.label5);
this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.groupBox2.Location = new System.Drawing.Point(391, 62);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(300, 184);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.groupBox2.Text = "TRANSFER TO";
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(137, 85);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(157, 20);
this.textBox4.TabIndex = 8;
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(137, 35);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(157, 20);
this.textBox5.TabIndex = 7;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(16, 88);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(42, 13);
this.label4.TabIndex = 6;
this.label4.Text = "NAME";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(16, 43);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(84, 13);
this.label5.TabIndex = 5;
this.label5.Text = "ACCOUNTNO";
//
// button1
//
this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button1.Location = new System.Drawing.Point(289, 302);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(93, 23);
this.button1.TabIndex = 2;
this.button1.Text = "TRANSFER";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click_1);
//
// button2
//
this.button2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button2.Location = new System.Drawing.Point(401, 302);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(75, 23);
this.button2.TabIndex = 3;
this.button2.Text = "CLOSE";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.button2_Click_1);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 15F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label6.ForeColor = System.Drawing.SystemColors.GradientActiveCaption;
this.label6.Location = new System.Drawing.Point(58, 13);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(573, 25);
this.label6.TabIndex = 4;
this.label6.Text = "MONEY TRANSACTION TO ANY BRANCHES OF THE BANK ";
//
// transaction
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(738, 350);
this.Controls.Add(this.label6);
this.Controls.Add(this.button2);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.Name = "transaction";
this.Text = "transaction";
this.Load += new System.EventHandler(this.transaction_Load);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.TextBox textBox5;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Label label6;
}
}
For Further Reading,
0 comments:
Post a Comment