Professional Documents
Culture Documents
CERTIFICAT
It is hereby certified that this is a bona fide project work done by Sarun.A.K.
(Reg.No: 11157312) in partial fulfillment of the requirements for the award of the sixth
semester of Bachelor of Computer Application of St. Thomas Arts And Science College
Puthencruz of Mahatma Gandhi University, Kottayam.
Mrs. RIBY
(Head of the
INTERNAL EXAMINER
EXTERNAL
EXAMINER
DECLARATION
Mrs. ANJANA
SARUN
A.K.
Place: Puthencruz
Date:
ACKNOWLEDGEMENT
First and for most I thank god almighty and to my parents for the success of
this project. I owe a sincere gratitude and heart full thanks to everyone who
shared their precious time and knowledge for the successful completion of
my project.
I record my sincere gratitude to Prof. V.K.Yoyakki, our respected
Principal, for providing all necessary facilities for successfully carrying out
this project.
I express my sincere thanks to Mrs. ANJANA VIJAYAN, my guide and
motivator throughout the work of my project.
I profusely thank other Asst.professors in the department and all other
members of the staff of St. Thomas Arts & Science College, Puthencruz, for
their guidance and inspiration throughout my course of study.
I owe my thanks to my friends and all others who have directly or
indirectly helped me in the successful completion of this project. No words
can express my humble gratitude to my beloved parents and relatives who
have been guiding me in all walks of my journey.
Sarun A.K
SYNOPSIS
Building Cost Estimator is an online service for accurately forecasting the scope,
cost, and duration of a building to be constructed. It develops the cost
information that customer needs to make a bid for a contract in construction.
Modules in this project:
8. Send Feedback
He can send feedback regarding product models or home plans to the administrator.
CONTENTS
CONTENTS
PAGE NO
1. INTRODUCTION
10
13
15
17
4. SYSTEM DESIGN
20
20
21
22
23
31
42
44
5.3. Maintenance
45
6. FUTURE ENHANCEMENT
47
7. CONCLUSION
49
8. BIBLIOGRAPHY
51
9. APPENDIX
9.1. Screen shots
53
73
INTRODUCTION
1. INTRODUCTION
Building cost estimator is an online service for accurately forecasting the scope,
cost, and duration of a building to be constructed. It develops the cost
information that customer needs to make a bid for a contract in construction.
Building cost estimator banks on the simplicity and effectiveness. The user can
fix a contract after the estimation of the cost of construction. The site hosts
information about the building products stored in its database. It provides
information regarding the building material cost, image etc of the corresponding
product and also has the provision for the selection of variety of building product
models available. Thereby the user can forecast the construction cost and change
the selections accordingly to reach at a rate at which the user expects. The
progress of the work is also updated and modification can also be made with
respect to users need.
Building cost estimator banks on the simplicity and effectiveness. The user can fix a
contract after the estimation of the cost of construction. The site hosts information about
the building products stored in its database. It provides information regarding the
building material cost, image etc of the corresponding product and also has the provision
for the selection of variety of building product models available. Thereby the user can
forecast the construction cost and change the selections accordingly to reach at a rate at
which the user expects. The progress of the work is also updated and modification can
also be made with respect to users need.
It facilitates in tracking actual costs as the project develops. The web page
contains an option which helps users to communicate with the administrator about any
complaints or any other feedbacks. Building cost estimator is flexible enough to make
changes as per your requirements, thus creating software customized for your individual
needs.
Building cost estimator is an online service for accurately forecasting the scope, cost,
and duration of a building to be constructed. It develops the cost information that
customer needs to make a bid for a contract in construction.
It helps in estimating the Basic Material Costs, Construction Activities, Labour Charges
and period of construction which are necessary for the construction activity. It contains
an interactive search option using which users can search for the required home plans
which helps the user to view home plans of his/her choice. It also allows the
administrator to add new home plans into it.
Building cost estimator banks on the simplicity and effectiveness. The user can fix a
contract after the estimation of the cost of construction. The site hosts information about
the building products stored in its database. It provides information regarding the
building material cost, image etc of the corresponding product and also has the provision
for the selection of variety of building product models available. Thereby the user can
forecast the construction cost and change the selections accordingly to reach at a rate at
which the user expects. The progress of the work is also updated and modification can
also be made with respect to users need.It facilitates in tracking actual costs as the
project develops. The web page contains an option which helps users to communicate
St. Thomas Arts And Science College, Puthencruz
with the administrator about any complaints or any other feedbacks Building cost
estimator is flexible enough to make changes as per your requirements, thus creating
software customized for your individual needs.
SYSTEM ANALYSIS
AND DESIGN
Lack of accuracy
Lot of time consumption
The greatest limitation to existing system is that the service to the customers is
limited.
System is complicated.
platform .net it is flexible enough to undergo future extensions. The system is user
friendly, and has online validations, look-up information and display of appropriate
error message. Since the system is available online it is accessible from anywhere.
It helps in estimating the Basic Material Costs, Construction Activities, Labor Charges
and period of construction which are necessary for the construction activity. It contains
an interactive search option using which users can search for the required home plans
which helps the user to view home plans of his/her choice. It also allows the
administrator to add new home plans into it.
Site Estimator banks on the simplicity and effectiveness. The user can fix a
contract after the estimation of the cost of construction. The site hosts information about
the building products stored in its database. It has the provision for the selection of
variety of building product models available. Thereby the user can forecast the
construction cost and change the selections accordingly to reach at a rate at which the
user expects. The progress of the work is also updated and modification can also be
made with respect to users need.
It facilitates in tracking actual costs as the project develops. The web page
contains an option which helps users to communicate with the administrator about any
complaints or any other feedbacks. Site Estimator is flexible enough to make changes
as per your requirements, thus creating software customized for your individual needs.
Site Estimator will make client interaction significantly more insightful.
In order to overcome the drawbacks in the existing system, database is created
which is integrated, reliable, consistent, flexible and secure. The features of the
proposed database are:
Menu driven and user friendly.
It assists in quick deletion of errors by issuing appropriate error messages.
Validity of input data is automatically checked and errors will be immediately
signaled.
Efficient utilization of resources.
Economic feasibility
Technical feasibility
Behavioral feasibility
The proposed system must be evaluated from a technical view point first and of
technical feasibility, their impact on the organization must be accessed. If compatible,
behavioral system can be devised. Then they must be tested for economical feasibility.
Economic feasibility:
Justification of any capital outlay is that it will reduce expenditure, improve the quality
of service of goods, which in turn may be expected to provide increased profits. The
technique of cost benefit analysis is often used as a basis for accessing economic
feasibility.
Technical feasibility:
The assessment of technical feasibility must be based on an outline design of systems
requirements in terms of inputs, output, files, programs and procedures this can be
qualified in terms of volumes of data, trends, frequency of update, cycles of activity etc,
in order to give an introduction of technical system.
Behavioral feasibility:
People are inherently resisted to change and computers have been known to facilitate
change. Since the new proposed system is nothing to do with the ordinary customers,
the worker resistance to the system is very much less. The users might be scared of job
losses and other problems when a new system is introduced.
Software specification
Operating System
: Windows 7
Platform
Front End
: ASP.NET
Language
: C#
Back End
Hardware specification
Microprocessor
Pentium 4
RAM
256 MB or more
Speed
1.6 GHz
Hard Disk
40 GB
Monitor
15 Color
Key Board
114 Keys
CD Drive
52
Mouse
requested (which means the developer need not perform a separate compilation step for
pages). This feature provides the ease of development offered by scripting languages
with the performance benefits of a compiled binary. However, the compilation might
cause a noticeable but short delay to the Web user when the newly edited page is first
requested from the Web server, but will not again unless the page requested is updated
further.
The ASPX and other resource files are placed in a virtual host on an Internet
Information Services server (or other compatible ASP.NET servers; see Other
implementations, below). The first time a client requests a page, the .NET Framework
parses and compiles the file(s) into a .NET assembly and sends the response; subsequent
requests are served from the DLL files. By default ASP.NET will compile the entire site
in batches of 1000 files upon first request. If the compilation delay is causing problems,
the batch size or the compilation strategy may be tweaked.
Developers can also choose to pre-compile their "code behind" files before deployment,
using Microsoft Visual Studio, eliminating the need for just-in-time compilation in a
production environment.[citation needed] This also eliminates the need of having the
source code on the Web server. It also supports pre-compile text.
When creating a database, the main concept is to know how the database is structured
in SQL.SQL stands for Structured Query Language. It is a language that enables us to
create and operate on relational database, which are sets of related information stored
in tables. Because of its elegance and independence from machine specific, as well as
its supports by the industry leaders in relational database technology, SQL has become
the standard language and will remains as it is for the foreseeable future.
There are two types of SQLs-interactive and embedded. Interactive SQL is used to
operate
SQL consists of SQL commands put inside of programs that are mostly written in some
other languages such as COBOL, Pascal, and C etc.
SYSTEM DESIGN
St. Thomas Arts And Science College, Puthencruz
4. SYSTEM DESIGN
System designs main aim is to identify the modules that should be in the
system, and the specifications of these modules and how they interact with each
other to produce the desired results. At the end of the system design all the
major data structures, file formats and the major modules in the system and their
specification are decided.
Methods for performing input validations and steps to follow when error occur. The
input screens are displayed in a way that the user can understand entries very easily.
Proper validation and controlling of input data will reduce the chance of errors. All
major operations are done only after checking the results of confirmation messages.
This makes the system more reliable and user friendly
The Primary goal of data base management system is to provide an environment that is
both conventional and efficient to use in retrieving information from and storing
information into database.
Data Model
A model is an abstraction process that hides superfluous details while highlighting
details pertinent to application at hand. A data models is a mechanism that provides this
abstraction for the storage of this data. There are many data models that are available for
the storage of data.
Most models provide mechanisms to structure data for the entities being modeled and
allows asset of operations to be defined on them. The models can also enforce a set of
constraints to maintain the high integrity of data. Some models are mentioned below.
Arrow:
A data flow is a route, which enables packets of data to travel from one point to another.
Data may flow from a source to a processor and from data store or process. An arrow
lines depicts the flow, with arrowhead pointing in the direction of flow
Circle:
A Process represents transformation where incoming data flows are changed into
outgoing data flows.
Open rectangle:
A data is a repository of data that is to be stored for use by one or more process may be
as simple as buffer or queue or sophisticated as relational database. They should have
clear names. If a process merely uses the content of store and doesnt alter it, the
arrowhead goes only from the store to the process. If process alters the details in the
store then a double-headed arrow is used.
Level 1: ADMIN
Level 1: USER
LEVEL2: ADMIN
St. Thomas Arts And Science College, Puthencruz
Data type
Description
adminmaster
Int(10)
Administrator Id
username
nvarchar(50)
User Name
password
nvarchar(50)
Password
Field
Data Type
Description
roofid
Int(10)
Roof Id
type
nvarchar(50)
Type of roof
cost
Int(10)
Cost
description
nvarchar(50)
img
nvarchar(50)
Image of roof
Data Type
Description
windowid
Int(10)
Window Id
type
nvarchar(50)
Type
cost
Int(10)
Cost
img
nvarchar(50)
Image of window
description
nvarchar(50)
Description
window
about
Data Type
Description
columnid
Int(10)
Column Id
type
nvarchar(50)
Type of Column
cost
Int(10)
Cost
image
nvarchar(50)
Image of Column
description
nvarchar(50)
Field
Data Type
Description
archid
Int(10)
Arch Id
type
nvarchar(50)
Type of Arch
cost
Int(10)
Cost
image
nvarchar(50)
Image of Arch
description
nvarchar(50)
Data Type
Description
mouldingid
Int(10)
Classic Moulding Id
type
nvarchar(50)
cost
Int(10)
Cost
image
nvarchar(50)
description
nvarchar(50)
Image
of
Moulding
Description
moulding
Classic
about
Data Type
Description
doorid
Int(10)
Door Id
type
nvarchar(50)
Type of Door
cost
Int(10)
Cost
image
nvarchar(50)
Image of Door
description
nvarchar(50)
Field
Data Type
Description
floorid
Int(10)
Floor Id
type
nvarchar(50)
Type
cost
Int(10)
Cost
img
nvarchar(50)
Image of Floor
description
nvarchar(50)
9.
Table
name: paintcompany
Primary key: paintid
Description: it is used to store paint details.
Field
Data Type
Description
paintid
Int(10)
Paint Id
name
nvarchar(50)
Name of PaintCompany
description
nvarchar(50)
Description about
company
Field
Data Type
Description
color_id
Int(10)
Colour Id
company_Id
nvarchar(50)
Paint Company Id
color
nvarchar(50)
Colour
cost
Int(10)
Cost
img
nvarchar(50)
Image of Colour
Data Type
Description
Id
Int(10)
Area Id
district
nvarchar(50)
District
cost
Int(10)
place
nvarchar(50)
Place
Field
Data Type
Description
plan_id
Int(10)
Building Plan Id
sqft
Int(10)
bedrooms
Int(10)
No. of Bedrooms
bathrooms
Int(10)
No. of Bathrooms
img
nvarchar(50)
Image of Plan
p_img
nvarchar(50)
Descriptive Image
Data Type
Description
M_id
Int(10)
Material Id
name
nvarchar(50)
Material Name
cost
Int(10)
Cost
Data Type
Description
floor_id
Int(10)
Floor Id
consumer_id
Int(10)
Consumer Id
exteriorwalls
Int(10)
height
Int(10)
Height of floor
roompartitions
Int(10)
roof
Int(10)
totarea
Int(10)
Data Type
Description
estimationid
Int(10)
Estimation Id
consumer_id
Int(10)
Consumer Id
builtarea
Int(10)
wcost
Int(10)
ccost
Int(10)
acost
Int(10)
rcost
Int(10)
fcost
Int(10)
pcost
Int(10)
clcost
Int(10)
dcost
Int(10)
total
Int(10)
TotalCost
Data Type
Description
feedbackid
Int(10)
Feedback Id
consumerid
Int(10)
Consumer Id
subject
nvarchar(50)
Subject of Message
message
nvarchar(50)
Message
dateofmessage
dateTime
Date of Message
Data Type
Description
Item_id
Int(10)
Id
consumer_id
Int(10)
Consumer Id
itmid
Int(10)
Item Id
type
nvarchar(50)
Type Of Item
noofitm
Int(10)
No. of Items
SYSTEM TESTING
AND
IMPLEMENTATION
Types of testing:
1. Unit Testing
2. Integration Testing
3. Validation Testing
4. Output Testing
5. User Acceptance Testing
Unit Testing
Unit testing focuses verification efforts on the smallest unit of software design, the
module. This is also known as Module Testing. The modules are separately. This
testing is carried out during programming stage itself. In this testing step each module is
found to be working satisfactorily as regard to the expected output from the module.
Integration Testing
Integration testing is a systematic technique for constructing tests to uncover errors
associated interface. In this project, all the modules combined. And then entire program
is tested as a whole, thus in the integration testing step, all the errors uncovered for the
next testing steps.
Validation Testing
Validation testing is where requirements established as a part of software requirement
analysis is validated against the software that has been constructed. This test provides
the final assurance that the software meets all functional, behavioral and performance
requirements. The errors, which are uncovered during integration testing, are corrected
during this phase.
Output Testing
After performing the validation testing, the next step is output testing of the proposed
system since no system could be useful if it does not produce the required output in the
specific format. The output generated or displayed by the system under consideration is
tested asking the users about the format required by them. Here, the output is considered
in two ways: one is on the screen and the other is printed format.
The output format on the screen is found to be correct as the format designed according
to the user needs. For the hard copy also, the output comes out as specified by the user.
Hence output testing doesnt result in any connection in the system.
5.3 MAINTENANCE
Maintenance is the enigma of software development. It holds the software industry
captive, typing up programming resources. It is perceived as requiring neither skill nor
experience. Maintenance covers wide range of activities, including correcting, coding
and design errors, updating documentation and test data and upgrading user support.
FUTURE ENHANCEMENT
6. FUTURE ENHANCEMENT
The system is developed and designed such a way that further expansion or
modification can be made to permit the evaluation. The focus of the system is to inherit
the requirements and update the system as per the needs. This project is so perfectly
designed that it satisfies the requirements.
This involves provided new future such as
More number item details can be inserted into the database.
E-payment
Upgrading the performance.
CONCLUSION
7. CONCLUSION
BIBLIOGRAPHY
8. BIBLIOGRAPHY
APPENDIX
View feedback
Arches Selection
Columns Selection
contact us
Customization
Customization menu
Doors Selection
Estimation result
Feedback Submit
Floor details
Flooring materials
Login
Moulding Selection
New registration
Show plans
Session.Add("adminid", admid);
string adname = mread.GetValue(0).ToString();
Session.Add("adminname", adname);
mread.Close();
Response.Redirect("~/Admin/WelcomeAdmin.aspx");
}
mread.Close();
}
Label3.Visible = true;
txtpwd.Text = "";
txtuname.Text = "";
}
protected void btncancel_Click(object sender, EventArgs e)
{
Response.Redirect("~/Login/Registration.aspx");
}
}
Registration
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
public partial class Login_Default : System.Web.UI.Page
{
SqlCommand cmd;
SqlCommand cmd2;
protected void Page_Load(object sender, EventArgs e)
{
DBclass.connection();
if (!IsPostBack)
{
Label15.Visible = false;
for(int i=1;i<=31;i++)
{
dpdday.Items.Add(i.ToString());
}
for (int i = 1901; i <= DateTime.Today.Year; i++)
{
dpdyear.Items.Add(i.ToString());
}
txtaddress.Text = "";
txtage.Text = "";
txtcity.Text = "";
txtcompwd.Text = "";
txtdist.Text = "";
txtfname.Text = "";
txtlname.Text = "";
txtmailid.Text = "";
txtph.Text = "";
txtpin.Text = "";
txtpwd.Text = "";
txtuname.Text = "";
}
}
Addmouldings
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
public partial class Admin_Default2 : System.Web.UI.Page
{
SqlCommand cmd;
SqlCommand cmd1;
public static string path;
SqlDataAdapter adptr;
DataSet dset = new DataSet();
static int flag = 0;
SqlDataReader mread;
protected void Page_Load(object sender, EventArgs e)
{
DBclass.connection();
if (!IsPostBack)
{
Label1.Visible = false;
dpdtype.Visible = false;
Label6.Visible = false;
gridfill();
St. Thomas Arts And Science College, Puthencruz
}
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
if (flag == 1)
{
string m = imgmouldings.ImageUrl;
cmd1 = new SqlCommand("select mouldingid from ClassicMouldings where
type='" + dpdtype.SelectedValue + "'", DBclass.con);
string mould_id = cmd1.ExecuteScalar().ToString();
cmd = new SqlCommand("update ClassicMouldings set type='" + txttype.Text +
"',image='" + m + "',cost='" + txtcost.Text + "',description='" + txtdescription.Text + "'
where mouldingid='" + mould_id + "'", DBclass.con);
cmd.ExecuteNonQuery();
Label6.Visible = true;
txttype.Text = "";
txtcost.Text = "";
txtdescription.Text = "";
imgmouldings.ImageUrl = "";
Label1.Visible = false;
dpdtype.Visible = false;
gridfill();
btnedit.Enabled = true;
}
else
{
cmd = new SqlCommand("insert into ClassicMouldings values('" + txttype.Text +
"','" + path + "','" + txtcost.Text + "','" + txtdescription.Text + "')", DBclass.con);
cmd.ExecuteNonQuery();
gridfill();
Label6.Visible = true;
St. Thomas Arts And Science College, Puthencruz
txttype.Text = "";
txtcost.Text = "";
txtdescription.Text = "";
imgmouldings.ImageUrl = "";
btnedit.Enabled = true;
}
flag = 0;
}
protected void btnedit_Click(object sender, EventArgs e)
{
flag = 1;
Label1.Visible = true;
dpdtype.Visible = true;
dpdtype.Items.Clear();
dpdtype.Items.Add("select...");
btnedit.Enabled = false;
cmd = new SqlCommand("select * from ClassicMouldings", DBclass.con);
mread = cmd.ExecuteReader();
while (mread.Read())
{
dpdtype.Items.Add(mread.GetValue(1).ToString());
}
mread.Close();
}
void gridfill()
{
adptr = new SqlDataAdapter("select * from ClassicMouldings", DBclass.con);
adptr.Fill(dset);
GridView1.DataSource = dset;
GridView1.DataBind();
}
protected void btnupload_Click(object sender, EventArgs e)
{
path = "~/images/Classicmouldings/" + fudmouldings.FileName;
fudmouldings.SaveAs(MapPath(path));
imgmouldings.ImageUrl = path;
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int rowindex = e.RowIndex;
int rowid = Convert.ToInt32(GridView1.DataKeys[rowindex].Value.ToString());
cmd = new SqlCommand("delete from ClassicMouldings where mouldingid='"
+rowid + "'", DBclass.con);
cmd.ExecuteNonQuery();
gridfill();
}
protected void dpdtype_SelectedIndexChanged1(object sender, EventArgs e)
{
cmd1 = new SqlCommand("select mouldingid from ClassicMouldings where type='"
+ dpdtype.SelectedValue + "'", DBclass.con);
string mouldid = cmd1.ExecuteScalar().ToString();
cmd = new SqlCommand("select * from ClassicMouldings where
mouldingid='"+mouldid+"'",DBclass.con);
mread = cmd.ExecuteReader();
while (mread.Read())
{
txttype.Focus();
txttype.Text = mread.GetValue(1).ToString();
St. Thomas Arts And Science College, Puthencruz
imgmouldings.ImageUrl = mread.GetValue(2).ToString();
txtcost.Text = mread.GetValue(3).ToString();
txtdescription.Text = mread.GetValue(4).ToString();
}
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("~/Admin/WelcomeAdmin.aspx");
}
protected void btncancel_Click(object sender, EventArgs e)
{
btnedit.Enabled = true;
Response.Redirect("~/Admin/AddClassicmouldings.aspx");
}
}
Addarch
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
public partial class Admin_Default : System.Web.UI.Page
{
SqlCommand cmd;
SqlCommand cmd1;
SqlCommand cmd2;
public static string path;
SqlDataAdapter adptr;
DataSet dset = new DataSet();
static int flag = 0;
SqlDataReader mread;
public static string arch_id = "";
protected void Page_Load(object sender, EventArgs e)
{
St. Thomas Arts And Science College, Puthencruz
DBclass.connection();
if (!IsPostBack)
{
lbltype.Visible = false;
dpdtype.Visible = false;
Label7.Visible = false;
gridfill();
}
}
protected void txttype_TextChanged(object sender, EventArgs e)
{
}
protected void btnsubmit_Click(object sender, EventArgs e)
{
if(flag==1)
{
string m=imgarch.ImageUrl;
cmd1=new SqlCommand("select archid from Arches where
type='"+dpdtype.SelectedValue+"'",DBclass.con);
arch_id=cmd1.ExecuteScalar().ToString();
cmd2=new SqlCommand("update Arches set
type='"+txttype.Text+"',image='"+m+"',cost='"+txtcost.Text+"',description='"+txtdescript
ion.Text+"' where archid='"+arch_id+"'",DBclass.con);
cmd2.ExecuteNonQuery();
Label7.Visible=true;
txttype.Text="";
txtcost.Text="";
txtdescription.Text="";
imgarch.ImageUrl="";
lbltype.Visible=false;
dpdtype.Visible=false;
St. Thomas Arts And Science College, Puthencruz
gridfill();
btnedit.Enabled = true;
}
else
{
cmd =new SqlCommand ("insert into Arches
values('"+txttype.Text+"','"+path+"','"+txtcost.Text+"','"+txtdescription.Text+"')",DBclass
.con);
cmd.ExecuteNonQuery();
Label7.Visible = true;
gridfill();
txttype.Text="";
txtcost.Text="";
txtdescription.Text="";
imgarch.ImageUrl="";
btnedit.Enabled = true;
}
flag=0;
}
GridView1.DataSource=dset;
GridView1.DataBind();
}
lbltype.Visible=true;
dpdtype.Visible=true;
Label7.Visible = false;
dpdtype.Items.Clear();
dpdtype.Items.Add("select...");
btnedit.Enabled = false;
cmd=new SqlCommand ("select * from Arches",DBclass.con);
mread=cmd.ExecuteReader();
while (mread.Read())
{
dpdtype.Items.Add (mread.GetValue(1).ToString());
}
mread.Close();
}
}
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
int rowindex = e.RowIndex;
int rowid = Convert.ToInt32(GridView1.DataKeys[rowindex].Value.ToString());
cmd=new SqlCommand("delete from Arches where
archid='"+rowid+"'",DBclass.con);
cmd.ExecuteNonQuery();
gridfill();
}
protected void LinkButton1_Click(object sender, EventArgs e)
St. Thomas Arts And Science College, Puthencruz
{
Response.Redirect("~/Admin/WelcomeAdmin.aspx");
}
}
Arches selection
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
{
SqlCommand cmd;
DataSet dset = new DataSet();
SqlDataAdapter adp;
SqlDataReader mread;
string arcid;
string noofitems;
protected void Page_Load(object sender, EventArgs e)
{
DBclass.connection();
if (!IsPostBack)
{
}
}
{
for (int i = 0; i <= DataList1.Items.Count; i++)
{
if (i < DataList1.Items.Count)
{
CheckBox ch = (CheckBox)DataList1.Items[i].FindControl("CheckBox1");
TextBox tx = (TextBox)DataList1.Items[i].FindControl("txtnoofitems");
if (ch.Checked == true)
{
cmd = new SqlCommand("select archid from Arches where archid='" +
ch.Text.ToString() + "'", DBclass.con);
mread = cmd.ExecuteReader();
if (mread.Read())
{
arcid += mread.GetValue(0).ToString() + ",";
}
mread.Close();
noofitems += tx.Text + ",";
}
}
}
Response.Redirect("~/users/Webcart.aspx?type=arches&arc=" + arcid +
"&noitemsarch=" + noofitems);
}
protected void LinkButton1_Click(object sender, EventArgs e)
{
Response.Redirect("~/users/UserItemSelection.aspx");
}
}
Cost estimation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
int doorcost = 0;
int brcost = 0;
int cmtcost = 0;
int rodcost = 0;
int noofworkers, builtarea, duration;
int totalcost;
string s;
int labourcharges;
int builtareacost;
int tcost;
protected void Page_Load(object sender, EventArgs e)
{
DBclass.connection();
ds.Clear();
adp = new SqlDataAdapter("select * from Item_selection where user_id='" +
Session["loginid"].ToString() + "'", DBclass.con);
adp.Fill(ds);
DataTable item_tab;
item_tab = ds.Tables[0];
string itemcost;
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "WINDOWS")
{
cmd = new SqlCommand("select cost from Window where windowid='" +
itemrow.ItemArray[2].ToString() + "'", DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
windcost
Convert.ToInt32(itemrow.ItemArray[5].ToString());
+=
Convert.ToInt32(itemcost)
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "ARCHES")
{
cmd = new SqlCommand("select cost from Arches where archid='" +
itemrow.ItemArray[2].ToString() + "'", DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
archcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "BRICKS")
{
cmd = new SqlCommand("select cost from Brick where brickid='" +
itemrow.ItemArray[2].ToString() + "'", DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
brcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "CEMENT")
{
cmtcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "COLORS")
{
cmd = new SqlCommand("select cost from color where colorid='" +
itemrow.ItemArray[2].ToString() + "'", DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
paintcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "COLUMNS")
{
cmd = new SqlCommand("select cost from Columns where columnid='" +
itemrow.ItemArray[2].ToString() + "'",DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
columcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "DOORS")
{
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "FLOORS")
{
cmd = new SqlCommand("select cost from Tiles where tileid='" +
itemrow.ItemArray[2].ToString() + "'", DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
flcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "IRONROD")
{
+=
Convert.ToInt32(itemcost)
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() ==
"CLASSICMOULDINGS")
{
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
if (itemrow.ItemArray[4].ToString().ToUpper().Trim() == "ROOFS")
{
cmd = new SqlCommand("select cost from Roof where roofid='" +
itemrow.ItemArray[2].ToString() + "'", DBclass.con);
itemcost = cmd.ExecuteScalar().ToString();
rfcost
+=
Convert.ToInt32(itemcost)
Convert.ToInt32(itemrow.ItemArray[5].ToString());
}
}
}
protected void btnestimate_Click(object sender, EventArgs e)
St. Thomas Arts And Science College, Puthencruz
noofworkers = Convert.ToInt32(Session["w"].ToString());
builtarea = Convert.ToInt32(Session["builtarea"].ToString());
duration = (builtarea * 5) / noofworkers;
s = duration + "days (noofworkers " + noofworkers + ")";
}
labourcharges = (((builtareacost + totalcost) * 40) / 100);
tcost = builtareacost + totalcost + labourcharges;
mRead.Close();
cmd = new SqlCommand("update Estimation set archcost='" + archcost +
"',windcost='" + windcost + "',columcost='" + columcost + "',doorcost='" + doorcost +
"',cmdingcost='" + cmdingcost + "',flcost='" + flcost + "',rfcost='" + rfcost +
mRead.Close();
}
mRead.Close();
}
private int noofdays(object p)
{
Response.Redirect("UserItemSelection.aspx");
}
}
Area details
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
string a;
string str;
int total;
protected void Page_Load(object sender, EventArgs e)
{
DBclass.connection();
if (!IsPostBack)
{
Label6.Visible = false;
txtbuildarea.Focus();
cmd = new SqlCommand("select distinct dist from AreaDetails", DBclass.con);
mread = cmd.ExecuteReader();
dpddistrict.Items.Add("Select......");
while (mread.Read())
{
dpddistrict.Items.Add(mread.GetValue(0).ToString());
}
mread.Close();
}
}
a = "Rural";
}
else if (rbtnmetro.Checked == true)
{
a = "Metropolitan";
}
Session.Add("builtarea", txtbuildarea.Text.Trim());
cmd1 = new SqlCommand("select cost from AreaDetails where dist='" +
dpddistrict.SelectedValue.ToString() + "' and area='" + a.ToString() + "'", DBclass.con);
str = cmd1.ExecuteScalar().ToString();
total = Convert.ToInt32(str) * Convert.ToInt32(txtbuildarea.Text);
St. Thomas Arts And Science College, Puthencruz