You are on page 1of 33

Department of Information and Communication

Technology
MANIPAL INSTITUTE OF TECHNOLOGY
(A constituent Institute of Manipal University)
MANIPAL - 576 104, KARNATAKA, INDIA

DBMS PROJECT REPORT


IV SEMESTER (2010-14 Batch)

Project Title

Sensex Management
DOS: 07-05-2012

DBMS Mini-project

(BE IT)

Team Members:

Divyanshu Verma- 100911479


Chaitanya Kumar- 100911477

Rahul Mittal- 100911441

Under the Guidance of

Mrs. ARCHANA BHAT


Assistance Professor
MANIPAL INSTITUTE OF TECHNOLOGY
DEPARTMENT OF INFORMATION AND COMMUNICATION
MANIPAL-576104

CERTIFICATE

This is to certify that the mini project titled “SENSEX


MANAGEMENT”
has been successfully completed by Divyanshu Verma, Chaitanya
Kumar and Rahul Mittal (100911479,100911477,100911441 respectively)
in fulfilment of the Mini Project in the 4th semester DBMS Lab B.E.
(IT) during the period January - May 2012 .

Examiner: Archana Bhat


Signature:
CONTENTS

TITLE PAGE
NO.

I. Introduction
1. Abstract 1

II. Requirements
1. Data Requirements 2
2. Functional Requirements 5
3. Non Functional Requirements 7

III. Design
1. Relational Schema Diagram 8
2. ER Diagram 9
3. Functional Dependencies 10
4. Normalization 11

IV. Implementation
1. Code 13

V. Screenshots 25

VI. Conclusion 28

VII. Reference 29
SENSEX MANAGEMENT
Abstract

It is a database dependent application which basically provides user the


access to Sensex which is the official index of Bombay Stock Exchange. It will
be in synchronization with the real time updates via internet. The application
is limited to only 30 current stocks which constitute the Sensex.

The application is made using C# and consists of a GUI. There will be many
forms which will serve the purposes of different functions and features to be
implemented. There will also be an option to sign up as a registered user.
Any query by a registered user will lead to changes in the database and will
be saved so that the user can track it even afterwards.

A user can access the database for different purposes like viewing the current
value of sensex or tracking any particular stock. A registered user will also
have an option to create his portfolio where he can keep a record of his
favourite stocks and can make changes to his profile. Any changes or query
made by such a user will update his portfolio and that will be in sync with
real time updates via internet. He/she will even be able to view the changes
in value of selected stocks as compared to previous day. A registered user
will have extra access to database as compared to unregistered users in
terms of maintaining customized portfolio, processing desired queries like
current value of stock, future Quarterly reports of the selected stock, highest
and lowest value of selected stock and many more. The updates will be taken
from the official Sensex website: http://bseindia.com/sensex/index.htm and other
websites whose addresses are given in references.

1
Data Requirements
Table: stock_info

Primary key: scrip_id

S. No. Attributes Data Type Description

1 scrip_id int Unique id of each stock


2 date_time varchar Value of stock at
particular date & time
3 ltp double Last Traded Price of a
particular stock
4 change_abs double Absolute change in
price of a stock from
the start of that day
5 change-per double Absolute change in
price in terms of
percentage of a stock
from the start of that
day

Table: stock_id

Primary Key: company_name

Foreign Key: scrip_id

S. No. Attributes Data Type Description

1 scrip_id int Unique id of each stock

2 company_name varchar Name of the company


corresponding to scrip
id

2
Table: sensex_val

Primary Key: date_time

S. No. Attributes Data Type Description

1 date_time varchar Date & Time at which


value of sensex is shown
2 value double Value of sensex at a
particular date & time
3 change_sensex double Absolute change in value
of sensex from the start
of the day
4 sensex_per double Absolute change in value
of sensex in terms of
percentage from the
start of the day

Table: login_details

Primary Key: email_id

S. No. Attributes Data Type Description

1 email_id varchar Email ID of the user to


be registered
2 password varchar Password provided by
the user
3 f_name varchar First name of the user
4 l_name varchar Last name of the user
5 dob date Date of birth of the user
6 gender varchar Gender of the user

3
Table: favourites

Primary Key: email_id

S. No. Attributes Data Types Description

1 email_id varchar Email ID of the user to


be registered
2 scrip_id int Unique id of each stock
selected as favourite by
the user
3 qty int Quantity of the stock
added by the user as
favourite
4 buying_price double Price of the stock at the
time when added as the
favourite

Table: user_status

Foreign Key: email_id

S. No. Attributes Data Type Description

1 email_id varchar Email ID of the user to be


registered
2 code varchar A code which is sent to the
user’s registered email id
for verification purpose
3 status varchar Status of the user as
Active or Inactive

4
FUNCTIONAL REQUIREMENTS

Interface Requirements:-
User Interface is there to provide communication between the user and the
system and our application also has communication between them. User
interface provides many functions to the user to select from and user based on
his/her requirements and needs selects one or the other. The various functions
provided by the system which the user can access are:-

Generic View: - This is the most basic feature which can be accessed by any
kind of user whether registered or unregistered. This is the function which will
be provided to the user when he/she opens the application. Under this, a user
can see sensex value, get basic knowledge about constituent 30 stocks and can
also read the news. He/she can also search a particular company by writing its
name or code in the box provided.

Registration: - A user who wishes to gain some extra facilities about sensex
and stock market can get registered and have his/her own portfolio created.
For registration a user needs to provide his/her email id, preferred password,
first name, last name, date of birth and gender. A confirmation code is sent to
the given email id to get it verified. After verification the user can login.

Login: - After the user gets registers, he selects the login option from the main
GUI. He/she has to provide email id, password and the code received in mail
box if he/she is logging in for the first time. If the credentials are correct then
user’s profile is displayed.

5
Portfolio: - After the user is logged in, the GUI displays the user’s first name
and he/she is shown extra buttons like Logout and view Portfolio. On clicking
view Portfolio, a new frame opens with new buttons like Edit Portfolio and
Back to Home. If the user has already created his/her portfolio then it will
display his/her favourite stocks with buying price, current price, quantity,
individual loss/gain in absolute as well as in terms of percentage. After clicking
Back to Home, the user returns to his/her default home page.

Edit Portfolio: - If the user has not created his portfolio yet then on clicking
Edit Portfolio button he/she can do this. After clicking the button, a new frame
opens with all the 30 stocks displayed in a tabular form. The user can select his
favourite by clicking on it and then providing its quantity in the box space
provided. A Save button is also there, clicking on which the portfolio is created.

6
Non Functional Requirements
I. Security:-
I.1. Login ID
Every registered user who uses the system shall have a Login ID and Password.

I.2. Modification
Any modification will be done only by registered user and will be synchronized with the real time
update via internet and portfolio will be immediately updated

II. Performance :-

II.1. Response Time


The application will respond in 2-3 seconds.

II.2. User Interface


The GUI is user informative and very user friendly.

II.2. Resource Utilization


The resources are modified according to the user’s operations like buying new stocks, etc.

II.3. Capacity
The application can support multiple users to get registered.

III. Maintainability:-
III.1. Back Up
All the data of the registered users are stored up in the database.

III.2. Errors
The application in designed in such a way that there is minimum scope of errors.

IV. Reliability:-
The system is very reliable because all the values are extracted from official website and other
reputed websites.

V. Availability:-
The system is available to the user 24 hours a day 7 days a week and 365 days a year.

VI. Usability:-
• The user must have some basic knowledge about Sensex and Stock Markets otherwise a
little training is required.
• The application is user friendly and self-explanatory.
VII. User Cost:-
The user can use this application free

7
RELATIONAL SCHEMA DIAGRAM

Stock_Id
Stock_Info
Scrip_Id
Scrip_Id
Date_Time Company_name
LTP
Change_Abs
Change_per

Favourites
Login_Details
Email_Id
Email_ID Scrip_Id
Password Qty
F_Name Buying_Price
L_name
DOB
Gender

User_Status
Email_Id
Code
Sensex_Val Status

Date_Time
Value
Change_sensex
Sensex_per

8
ER DIAGRAM
Stock_Id
Stock_Info
Scrip_Id Scrip_Id
Extract
Date_Time Company_details
LTP Company_name
Change_Abs
Change_per

Favourites
Retrieve
_LTP Email_Id
Scrip_Id
Qty
Buying_Price
Login_Details
Email_ID View
Password
F_Name
L_name
DOB
Gender

Authentication
User_Status
Email_Id
Code
Status
Sensex_Val
Date_Time
Value Sensex_
Retrieval
Change_sensex
Sensex_per

9
FUNCTIONAL DEPENDENCIES

1. STOCK_INFO Table

Scrip_Id { Date_Time, LTP, Change_Abs, Change_per }

2. STOCK_ID Table

Scrip_Id Company_Name

3. Sensex_Val

Date_Time { Value, Change_Sensex, Sensex_per }

4. Login_Details

Email_Id { Password, F_Name, L_Name, DOB, Gender }

5. User_Status

Email_Id {Code, Status }


6. Favourites

Email_Id { Scrip_Id, Qty, Buying_Price }

10
NORMALIZATION

STOCK

Scrip_Id Date_Time LTP Change_Abs Change_per Company_name

2NF Normalization

Stock_Info

Scrip_Id Date_Time LTP Change_Abs Change_per

Stock_ID

Scrip_Id Company_name

Sensex_Value

Date_Time Value Change_Sensex Sensex_per

11
User

Email_ID Password F_Name L_Name DOB Gender Code Status

2NF Normailization

Login_Details

Email_Id Password F_Name L_Name DOB Gender

User_Status

Email_Id Code Status

Favourites

Email_Id Scrip_Id Qty Buying_price

12

Form1.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.Net;
using System.IO;
using System.Threading;

namespace SensexManager
{
public partial class Form1 : Form
{
String[] companyNames = { "Bajaj Auto", "Bharti Airtel", "BHEL", "Cipla",
"Coal India", "DLF", "Gail India", "HDFC", "HDFC Bank", "Hero MotoCorp", "Hindalco
Inds", "Hindustan Unilever", "ICICI Bank", "Infosys", "ITC", "Jindal Steel", "L&T",
"Mahindra & Mahindra", "Maruti Suzuki", "NTPC", "ONGC", "RIL", "SBI", "Sterlite Inds",
"Sun Pharma", "Tata Motors", "Tata Power", "Tata Steel", "TCS", "Wipro" };
public String username = "GUEST!";
System.Windows.Forms.Timer timer1;
String[][] cv;
String[] sv;
int tickTim = 0;
String tickText = "";
String email = "";
Boolean work = false;
public Form1()
{
//Loading ll = new Loading();
//ll.Show();
//this.Hide();

InitializeComponent();

reload_data();

label14.Text = username;
button1.Show();
button4.Hide();

for (int i = 0; i < 30; i++)


tickText += companyNames[i] + " ";

textBox2.Text = tickText;

//ll.Close();
//this.Show();

//Thread for reloading data


BackgroundWorker bw = new BackgroundWorker();

// this allows our worker to report progress during work


bw.WorkerReportsProgress = true;

// what to do in the background threa


bw.DoWork += new DoWorkEventHandler(
delegate(object o, DoWorkEventArgs args)
{
BackgroundWorker b = o as BackgroundWorker;
while (true)
{
reload_data();
b.ReportProgress(40);
Thread.Sleep(15000);
}
});

bw.ProgressChanged += new ProgressChangedEventHandler(


delegate(object o, ProgressChangedEventArgs args)
{
if (work)
{
DateTime dt = DateTime.Now;
label15.Text = String.Format("{0:dddd, MMMM d, yyyy}", dt);

label1.Text = sv[0];
label2.Text = sv[1];
label3.Text = sv[2];
label4.Text = sv[3];
label5.Text = sv[4];
label6.Text = sv[5];
label7.Text = sv[6];

if (!label2.Text.Equals(""))
{
if (double.Parse(label2.Text) <= 0)
pictureBox1.Hide();
else
pictureBox2.Hide();
}
else
label2.Text = "0.00";

System.Windows.Forms.ListBox.ObjectCollection obc = listBox1.Items;


obc.Clear();

tickText = "";
for (int i = 0; i < 30; i++)
{
String spac = " ";
String cn = companyNames[i];
for (; cn.Length < 30; cn += spac) ;
obc.Add(cn + cv[i][1]);//cv[i]);
tickText += companyNames[i] + " " + cv[i][1] + " ";
}

textBox2.Text = tickText;
}
});

bw.RunWorkerAsync();

//Timer for ticker


timer1 = new System.Windows.Forms.Timer();
timer1.Interval = 150;
timer1.Enabled = false;
14
timer1.Start();
timer1.Tick += new EventHandler(timer_Tick1);

void timer_Tick1(object sender, EventArgs e)


{
int ind = 125;
if(textBox2.Text.Length < ind)
ind = textBox2.Text.Length;
if (ind > 0 && tickTim < ind)
textBox2.Text = tickText.Substring(tickTim, ind);
else
tickTim = 0;
tickTim = (tickTim+1)%ind;
}

public void reload_data()


{
try
{
work = true;
//String[] sv = { "0", "0", "0", "0", "0", "0", "0" };
sv = getSensexValues();

//String[] cv = { "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0",
"0", "0", "0", };
cv = getCompanyValues();
}
catch (Exception ex)
{
//textBox2.Text = "Not connected to the internet!";
work = false;
}
}

public void updateUser(String email)


{
label14.Text = username;
this.email = email;
button2.Text = "Log Out";
button1.Hide();
button4.Show();
}

private void button2_Click(object sender, EventArgs e)


{
if (label14.Text.Equals("GUEST!"))
{
SignIn si = new SignIn(this);
si.Show();
}
else
{
button2.Text = "SignIn";
label14.Text = "GUEST!";
button1.Show();
button4.Hide();
}
} 15
private void button1_Click(object sender, EventArgs e)
{
Register r = new Register(this);
r.Show();
}

public static String[][] getCompanyValues()


{

downloadPage("http://www.bseindia.com/mktlive/indiceswatch_scrip.asp?iname=BSE30&sensi
d=30&type=sens", "D:\\temp\\temp_web.html");
String s = returnStringFromFile("D:\\temp\\temp_web.html");

String skey = "<td class=\"tbmain\" align=\"center\" valign=\"top\">";


String ekey = "</td>";

String[] v1 = extractValue(s, skey, ekey, 30);

skey = "<td class=\"tbmain\" align=\"right\" valign=\"top\">";

String[] v2 = extractValue(s, skey, ekey, 90);

String[][] temp = new String[30][];

for (int i = 0; i < int.Parse(v1[0]); i++)


{
temp[i] = new String[4];
temp[i][0] = v1[i + 1];
temp[i][1] = v2[i * 3 + 1];
temp[i][2] = v2[i * 3 + 2];
temp[i][3] = v2[i * 3 + 3];
}

return temp;
}
public static String[] getSensexValues()
{
String[] temp = new String[7];

downloadPage("http://www.moneycontrol.com/sensex/bse/sensex-live",
"D:\\temp\\temp_web.html");
String s = returnStringFromFile("D:\\temp\\temp_web.html");

String skey = "<div class='FL r_35'><strong>";


String ekey = "</strong></div>";

temp[0] = extractValue(s, skey, ekey, 1)[1];

skey = "<div class='FL r_20 PT10 MT3'><strong>";


ekey = "</strong></div>";

temp[1] = extractValue(s, skey, ekey, 1)[1];

skey = "<div class='FL r_15 PT10 MT3 PL5'>";


ekey = "</div>";

temp[2] = extractValue(s, skey, ekey, 1)[1];

skey = "<td style=\"text-align:left\" align=\"center\" class=\"br01\">";


ekey = "</td>";
16
temp[3] = extractValue(s, skey, ekey, 1)[1];
skey = "<td align=\"center\" class=\"br01\">";
ekey = "</td>";

temp[4] = extractValue(s, skey, ekey, 2)[1];


temp[5] = extractValue(s, skey, ekey, 2)[2];

skey = "<td align=\"center\">";


ekey = "</td>";

temp[6] = extractValue(s, skey, ekey, 1)[1];

return temp;
}
public static String[] extractValue(String source, String stkey, String
endkey, int limit)
{
String[] temp = new String[limit + 1];
int top = 0;
for (int i = 0, j = 0; i < source.Length && j < limit; j++)
{
int stind = source.IndexOf(stkey, i);
if (stind == -1)
break;
int diff = source.IndexOf(endkey, stind + 2) - stind - stkey.Length;
String extract = source.Substring(stind + stkey.Length, diff);
temp[++top] = extract;
i = stind + stkey.Length + 3;
}
temp[0] = top.ToString();
return temp;
}
public static Boolean downloadPage(String url, String path)
{
try
{
WebClient client = new WebClient();
client.DownloadFile(url, path);
}
catch (Exception e)
{
return false;
}
return true;
}
public static String returnStringFromFile(String path)
{
try
{
StreamReader sr = new StreamReader(path);
String temp = sr.ReadToEnd();
sr.Close();
return temp;
}
catch (Exception e)
{
return null;
}
}

private void Form1_Load(object sender, EventArgs e


{
}

private void button4_Click(object sender, EventArgs e)


{
Portfolio p = new Portfolio(this, label14.Text, email);
this.Hide();
p.Show();
}

/*private void listBox1_SelectedIndexChanged(object sender, EventArgs e)


{
listBox1.MouseDoubleClick += new
MouseEventHandler(listBox1_MouseDoubleClick);
}*/

/*void listBox1_MouseDoubleClick(object sender, MouseEventArgs e)


{
StockInfo sin = new StockInfo();
for (int i = 0; i < 30; i++)
if (listBox1.GetSelected(i))
sin.Show();

}*/

}
}

SignIn.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.IO;
using System.Threading;
using Oracle.DataAccess.Client;

namespace SensexManager
{
public partial class SignIn : Form
{
private Form1 form1 = null;

String connstr = "";


OracleConnection conn = null;
OracleDataAdapter da = null;
DataSet ds = null;
DataTable dt = null;

Boolean code = false;


Boolean password = false;
String uname = "USER";

public SignIn()
{
InitializeComponent();
}

public SignIn(Form1 form1)


{
// TODO: Complete member initialization
this.form1 = form1;
InitializeComponent();
form1.Hide();
}

public void connect()


{
connstr = "Data Source=Divyanshu;user id=system;password=1234red";
conn = new OracleConnection(connstr);
conn.Open();
}

public void load()


{
connect();
String str = "select password,fname from login_details where
email_id='"+textBox1.Text+"'";

da = new OracleDataAdapter(str, conn);


ds = new DataSet();
da.Fill(ds, "login_details");

dt = ds.Tables[0];
String pass = (dt.Rows[0]["password"]).ToString();
uname = (dt.Rows[0]["fname"]).ToString();
if (pass.Equals(textBox2.Text))
password = true;
else
password = false;
}

public void load2()


{
connect();
String str = "select status from user_status where email_id='" +
textBox1.Text + "'";

da = new OracleDataAdapter(str, conn);


ds = new DataSet();
da.Fill(ds, "user_status");
dt = ds.Tables[0];

String status = (dt.Rows[0]["status"]).ToString();


if (status.Equals("valid"))
code = true;
else
code = false;
}

private void button3_Click(object sender, EventArgs e)


{
this.Close();
form1.Show();
}

private void button2_Click(object sender, EventArgs e)


{
load();
conn.Close();
load2();
conn.Close();

if (password)
{
if (code)
{
form1.username = uname;
form1.updateUser(textBox1.Text);
form1.Show();
this.Close();
}
else
label4.Text = "Click on \"Enter Code\" for verifying your code.";
}
else
label4.Text = "Sorry, the details don't match";
}

public void updatelabel(String txt)


{
label4.Text = txt;
}

private void button1_Click(object sender, EventArgs e)


{
ValidateCode vc = new ValidateCode(this);
this.Hide();
vc.Show();
}
}
}

Register.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.IO;
using System.Net.Mail;
using Oracle.DataAccess.Client;

namespace SensexManager
{
public partial class Register : Form
{
private Form1 form1;

String email = "";


String connstr = "";
OracleConnection conn = null;
OracleDataAdapter da = null;
DataSet ds = null;
DataTable dt = null;

String code = "";

public Register()
{
InitializeComponent();
}

public Register(Form1 form1)


{
// TODO: Complete member initialization
InitializeComponent();
this.form1 = form1;
form1.Hide();
}

public void connect()


{
connstr = "Data Source=Divyanshu;user id=system;password=1234red";
conn = new OracleConnection(connstr);
conn.Open();
}

public void load()


{
connect();
String date = (string)comboBox1.SelectedItem;
String month = (string)comboBox2.SelectedItem;
String year = (string)comboBox3.SelectedItem;
String gender = "";
if (radioButton1.Checked)
gender = "Male";
else
gender = "Female";
String str = "insert into login_details values('" + textBox1.Text + "','"
+ textBox2.Text + "','" + textBox4.Text + "','" + textBox5.Text + "','"+date+"-
"+month+"-"+year+"','"+gender+"')";

OracleCommand cmd = conn.CreateCommand();


cmd.CommandText = str;
cmd.ExecuteNonQuery();
}

public void load2()


{
connect();
String str = "insert into user_status values('" + textBox1.Text + "','" +
code + "','invalid')";
OracleCommand cmd = conn.CreateCommand();
cmd.CommandText = str;
cmd.ExecuteNonQuery();
}

private void button2_Click(object sender, EventArgs e)


{
form1.Show();
this.Close();
}
private void button1_Click(object sender, EventArgs e)
{
StreamWriter sw = new StreamWriter("D:\\temp\\login\\login.txt",true);
if(textBox2.Text.Equals(textBox3.Text))
sw.Write(textBox1.Text+">>>"+textBox2.Text + "\n");
sw.Close();

MailMessage mailMsg = new MailMessage();


System.Net.NetworkCredential cred = new
System.Net.NetworkCredential("no.reply.Sensex.Manager@gmail.com",
"qwertyuiop[]\\1234567890-=");
mailMsg.From = new MailAddress("no.reply.Sensex.Manager@gmail.com");
mailMsg.Subject = "Your Confirmation Code";
mailMsg.IsBodyHtml = true;
code = GetPassword();
mailMsg.Body = "Thank you for registering to Sensex Manager. We intend to
provide you the best of services.<br/>Your confirmation code is:
<h1>"+code+"</h1><br/>Kindly copy and paste it into the
software.<br/><br/>Regards,<br/>Senex Manager Team";
mailMsg.To.Add(new MailAddress(textBox1.Text));
SmtpClient smtpClient = new SmtpClient("smtp.gmail.com");
smtpClient.Port = 587;
smtpClient.EnableSsl = true;
smtpClient.UseDefaultCredentials = false;
smtpClient.Credentials = cred;
smtpClient.Send(mailMsg);

load();
conn.Close();

load2();
conn.Close();

MsgCodeSent ms = new MsgCodeSent(form1);


ms.Show();
this.Close();
}
private int RandomNumber(int min, int max)
{
Random random = new Random();
return random.Next(min, max);
}
private string RandomString(int size, bool lowerCase)
{
StringBuilder builder = new StringBuilder();
Random random = new Random();
char ch;
for (int i = 0; i < size; i++)
{
ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 *
random.NextDouble() + 65)));
builder.Append(ch);
}
if (lowerCase)
return builder.ToString().ToLower();
return builder.ToString();
}
public string GetPassword()
{
StringBuilder builder = new StringBuilder();
builder.Append(RandomString(8, true));
builder.Append(RandomNumber(1000, 9999));
return builder.ToString();
}
}
}

ValidateCode.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 Oracle.DataAccess.Client;

namespace SensexManager
{
public partial class ValidateCode : Form
{
SignIn si;

String connstr = "";


OracleConnection conn = null;
OracleDataAdapter da = null;
DataSet ds = null;
DataTable dt = null;

Boolean chk = false;


public ValidateCode(SignIn si)
{
this.si = si;
InitializeComponent();
}

public void connect()


{
connstr = "Data Source=Divyanshu;user id=system;password=1234red";
conn = new OracleConnection(connstr);
conn.Open();
}

public void load2()


{
connect();
String str = "select code from user_status where email_id='" +
textBox1.Text + "'";

da = new OracleDataAdapter(str, conn);


ds = new DataSet();
da.Fill(ds, "user_status");
dt = ds.Tables[0];

String code = (dt.Rows[0]["code"]).ToString();

if (code.Equals(textBox2.Text))
chk = true;
else
chk = false;
}

private void button3_Click(object sender, EventArgs e)


{
this.Hide();
si.Show();
this.Close();
}

private void button2_Click(object sender, EventArgs e)


{
load2();
String str = "update user_status set status='valid' where email_id='" +
textBox1.Text + "'";
OracleCommand cmd = conn.CreateCommand();
cmd.CommandText = str;
cmd.ExecuteNonQuery();

this.Hide();
si.Show();
si.updatelabel("Code Confirmed.");
this.Close();
}
}
}

MsgCodeSent.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;

namespace SensexManager
{
public partial class MsgCodeSent : Form
{
Form1 f1;
public MsgCodeSent(Form1 f1)
{
InitializeComponent();
this.f1 = f1;
}

private void button1_Click(object sender, EventArgs e)


{
f1.Show();
this.Close();
} }
25
26
27
CONCLUSION
After all the rigorous sittings and hours of hard labour by all the team members, the project
is finally completed and has really shaped in a satisfying way. The application stands out in
most of its performance requirements and also has a very friendly and self-explaining user
interface.

The application is very practical and simple to run and use. In today’s time when personal
finance is so much important that everyone needs to be updated about stock market and its
day to day happenings, this application can prove to be very handy to the user in terms of
keeping track of favourite stocks and virtual loss or gain. It also satisfies security concerns as
it is based on email id, password and one time verification code.

We hope the application ends up giving a nice experience to every user and has no fatal
errors and any severe drawback. Any suggestion or feedback is eagerly awaited by us.

28
REFERENCES
The following references helped immensely in gathering information about the project and
its creation. The application accesses them to update and retrieve the values of sensex and
its individual stock. All the references provided below may not have explicit use in the
application or for the user but were visited numerous times by the developers during the
development of the project for different information and knowledge. If any reference is
missed in the list below it is deeply regretted. The references are as follows:-

http://en.wikipedia.org/wiki/BSE_SENSEX

http://en.wikipedia.org/wiki/Bombay_Stock_Exchange

www.bseindia.com/sensex/index.htm

http://www.bseindia.com/stockinfo/indices.aspx

http://www.bseindia.com/

http://www.bseindia.com/sensex/mktwatchR.aspx?filter=gainer*all$all$

http://www.bseindia.com/about/abtip.asp

http://www.bseindia.com/mktlive/adv_dec/advdec.asp

http://www.bseindia.com/sensex/groupvols.aspx

http://www.bseindia.com/sensex/groupvals.aspx

http://www.bseindia.com/deri/HotLinks/Notices.aspx?L=2&id=hd3&Lid=0

http://www.bseindia.com/deri/HotLinks/DeriHistorical.aspx?L=2&id=hd4&Lid=0

http://www.bseindia.com/about/list_comp.asp

http://www.bseindia.com/about/datal/change/changes.asp

http://www.bseindia.com/ipo/schema.asp

http://www.bseindia.com/mktlive/contactinformation.asp

http://www.bseindia.com/about/illiquidscrips.asp

http://www.bseindia.com/tagcloud/mktgalaxy.aspx

http://www.moneycontrol.com/stocksmarketsindia/

http://www.moneycontrol.com/sensex/bse/sensex-live

http://www.moneycontrol.com/earnings/
http://www.moneycontrol.com/stocks/marketstats/index.php

http://www.moneycontrol.com/mccode/tools/

http://poweryourtrade.moneycontrol.com/plus/login/login.php

30

You might also like