Online Society Tracking: A Project Report On
Online Society Tracking: A Project Report On
Online Society Tracking: A Project Report On
[2025194]
1
SANPADA COLLEGE OF COMMERCE AND TECHNOLOGY
CERTIFICATE
College Seal
2
ACKNOWLEDGEMENT
This Project, being a maiden experience for me, has been a big
confidence booster. Contributions of the following individuals / persons are
noteworthy. It gives me immense pleasure to acknowledge the innumerable
guidance extended to me by Mr.________ (Online Society Tracking). I extend
my sincere thanks to him who helped me in getting the details of the
processes of the shop. I would like to thank my classmates for their help in
ASP.NET.
I wish to express our gratitude to the staff of CS, department for their
co-operative & considerate approach. Last but not least, our sincere thanks
to College who gives us a great opportunity to grape the knowledge.
Students Signature,
T.Y.B.sc.(CS.)
3
INDEX
1. ACKNOWLEDGEMENT
2. PRELIMINARY INVESTIGATION
Organizational Overview
Description of System
Limitations of present system
Proposed system & its advantages
Feasibility Study
Stakeholders,
technologies used
Gantt Chart
3. SYSTEM ANALYSIS
Fact Finding Techniques
Use Case Diagram
ERD
Activity Diagram
Class Diagram
Object Diagram
Sequence Diagram
4. SYSTEM DESIGN
ER Diagram
Converting ERD to Tables
5. SYSTEM CODING
Validation
Tests
6 SYSTEM IMPLEMENTATIONS
Form design
Coding
7. FUTURE ENHANCEMENT
8. CONCLUSION
9. REFERENCES
4
2.1 : Organizational Overview
Project is based on Packing and Moving related services for Re-alocation of household
and other heavy things.
Maintaining the details of the user who order for a packing and moving their
goods for one place to another place.
Providing different types of service to user as per his needs and requirements.
Also maintains the details via login process and record their order details.
Maintaining availability of Date and Time as well as with Vehicles and Labours.
Details about the requirement of the Labours and Vehicle from the admin are maintained
properly.
Generation of Bill.
ORGANIZATIONAL CHART:
5
2.2 : Description Of System
In present non-computerized packers and movers management system all the jobs
are performed manually. All the records of Order ,User, Labour details ,vehicle details ,
Confirmed
are written in different register. Accountant will have to maintain all separate registers of each
new information. So managing them is very complex and has become a impossible task to be
performed manually systematic way. As the job is done manually, it has its own limitations
and lot’s of paperwork. This system maintain all the record in short memory space.
The daily and monthly records, which are done manually, are not easy to maintain in
files or registers, which can be destroyed anytime by any person. But in this system we can
store large amount of data & whenever we want we can see in few seconds.
Time required for searching records of particular day sale information is more. But this
system shows all dates information with all information. In present system entire work depend
upon sales and purchase. Billing is also done manually; it takes lots of time and throws open
doors manipulation and updating of records they can be done by cashier. Bill is not readable
which creates confusion in customer as well as Supplier. Any manual error can be lead to wrong
result.
6
2.3 : Limitation of Present System
7
2.4 : Proposed System
Information of each Customer with its record can be maintained in computer and
user will not have to maintain register / paperwork.
8
2.5 : Advantage of Proposed System
All the information about customer, labours, vehicle, bills, will be maintain properly in this
system.
All manual calculation of realocation order or all the money management will be performed by
the computer automatically.
It is very user friendly and easy to handle. So the computerized system is more suitable than
the manual system.
9
2.6 : Feasibility Study
Feasibility study tells whether the system would be beneficial for the organization with
respect of the organization. Feasibility study is divided into following phases
Phase of feasibility:
I. Operational Feasibility:
Operational feasibility is dependent on the human resources available for the project
and involves projecting whether the system will operate and be used once it is installed.
The proposed system is according to the requirements of the Auto Fuel Technologies,
and after when it will be implemented in the AFT, is likely to yield benefits for the
whole Company. As the people are already familiar with using application programs
like Microsoft Office so, there is no chance of any sort of destructive resistance to the
implementation of this project. It is mainly concerned with the availability of human
resources for the project and it also tells whether the system would be operating -able
after its deployment or not. If the project meets the needs of an organization then it is
operationally feasible. The proposed system would be beneficial in this regard as it
would be exactly according to user requirements and will give the guarantee of
complete data security. It will provide the end users with timely pertinent, accurate and
usefully formatted information by making a full use of the available resources.
10
With the deployment of the new system on one hand the organization got benefited but
on the other hand it also affects the employees of the organization .Social Feasibility is
done in order to check this effect. It checks whether the system affects the job of
employees and how much it affects the employees. The social evaluation how the
proposed system may improve the job and the working environment of those affected.
My proposed system will affect the staff of the organization. As many persons would
be enough to run this system despite how many manual records keepers, but other
persons would be accommodated on the other places as the organization is escalating
and he see that person are worked in proper way or not. In AFT I have to see that the
staff working in Auto Fuel Technical has knowledge of how to use the technology as
well as user training to use the project.
Economic Feasibility is the measurement of the cost effectiveness of the project proposed
system. The bottom line in many projects is economic feasibility. During the early phase
of the perfect economic feasibility analysis amount little more judging whether the possible
benefits of the solution or worthwhile. Costs are practically impossible to estimate at that
stage because the end user requirement and alternative technical solutions have not been
identified. However as soon as specific requirement have been identified, the analyst can
weigh the cost and benefit of each alternative solution. This called the cost and benefit
analysis. It is the measure of cost effectiveness of a project. This is often calling cost and
benefits analysis. So in economical feasibility we see what cost required implementing the
new system. In AFT Automation system I have to see what costs are involved. So I have to
consider all the facts that are related to new system cost.
11
Software Specification :
Hardware Specification :
The hardware interfaces defines the hardware devices needed for an application to run
such as type of processor and the amount of memory required.
RAM 512 MB
12
FRONTEND : MICROSOFT VISUAL STUDIO 2010
1. First of all, ASP.NET provides managed code execution that runs under the Common
Language Runtime (CLR), resulting in robust, stable and secure applications. All features
of the .NET framework are readily available in ASP.NET
2. The .NET framework comes with ADO.NET, which follows the disconnected paradigm,
i.e. once the required records are fetched the connection no longer exists. It also retrieves
the records that are expected to be accessed in the immediate future. This enhances
Scalability of the application to a great extent.
3. ASP.NET MVC 4 is a framework for developing highly testable and maintainable Web
applications that follow the Model-View-Controller (MVC) pattern. The framework
encourages you to maintain a clear separation of concerns— views for UI, controllers for
handling user input, and models for domain logic. ASP.NET MVC applications are
particularly suited for unit testing and using test-driven development (TDD) techniques.
ASP.NET MVC 4 makes it easy to write applications for the mobile web through adaptive
rendering and device specific display modes.
• ASP.NET Web API, a framework for building and consuming HTTP services that can
reach a broad range of clients including browsers, phones, and tablets. ASP.NET Web API
is great for building services that follow the REST architectural style, plus it supports RPC
patterns.
• ASP.NET Web Pages and the new Razor syntax provide a fast, approachable, and
lightweight way to combine server code with HTML to create dynamic web content.
• Web Optimization, a framework for bundling and minifying scripts and CSS files.
4. We are using the c# for this project ,c# the important programming language.
5. C# is a multi paradigm language encompassing strong typing, imperative, declarative,
functional, generic, object-oriented (class-based), and component-oriented programming
disciplines. It was developed by Microsoft within its .NET initiative and later approved as a
standard by Ecma .C# is one of the programming languages designed for the Common
Language Infrastructure.
6. C# is a general-purpose, object-oriented programming language
7.
IBM developed the original version of SQL, originally called Sequel, as part of the
System R Project in the early 1970s. The Sequel language has evolved since then, and its
name has changed to SQL (Structured Query Language).Many products now support the
SQL language. SQL has clearly established itself as the standard relational database
language.
In 1986,the American Standards Institute (ANSI) and the International Organization
for Standardization (ISO) published an SQL standard, called SQL-86.ANSI published an
extended standard for SQL,SQL-89,in 1989.The next version of the standard was SQL-92
13
standard followed by SQL:1999,SQL:2003 and then SQL:2005, the versions of SQL:2008
and SQL :2008(R2), SQL :2012, SQL :2014, SQL :2016, SQL :2017.
The SQL language has several parts:
Data-definition language (DDL): The SQL DDL provides commands for defining
relation schemas, deleting relations, and modifying relation schemas.
View definition: The SQL DDL includes commands for defining views.
Transaction control: SQL includes commands for specifying the beginning and
ending of transactions.
Embedded SQL and Dynamic SQL: Embedded and dynamic SQL define how SQL
statements can be embedded within general-purpose programming languages, such
as C, C++.Java, PL/I, COBOL, Pascal, and FORTRAN.
Authorization: The SQL DDL includes commands for specifying access rights to
relations and views.
SQL Server 2008 R2 is Microsoft’s latest release of its enterprise relational database and
business intelligence (BI) platform, and it builds on the base of functionality established
by SQL Server 2008. However, in spite of the R2 moniker, Microsoft has added an
extensive set of new features to SQL Server 2008 R2. Although the new support for self-
service BI and PowerPivot has gotten the lion’s share of attention, SQL Server 2008 R2
includes several other important enhancements. In this article, we’ll look at the most
important new features in SQL Server 2008 R2.
New Editions
Some of the biggest changes with the R2 release of SQL Server 2008 are the new
editions that Microsoft has added to the SQL Server lineup. SQL Server 2008 R2
Datacenter Edition has been added to the top of the relational database product lineup
and brings the SQL Server product editions in-line with the Windows Server product
editions, including its Datacenter Edition. SQL Server 2008 R2 Datacenter Edition
provides support for systems with up to 256 processor cores. In addition, it offers
multiserver management and a new event-processing technology called
StreamInsight. (I’ll cover multiserver management and StreamInsight in more detail
later in this article.)
14
The other new edition of SQL Server 2008 R2 is the Parallel Data Warehouse Edition.
The Parallel Data Warehouse Edition, formerly code-named Madison, is a different
animal than the other editions of SQL Server 2008 R2. It’s designed as a Plug and
Play solution for large data warehouses. It’s a combination hardware and software
solution that’s available only through select OEMs such as HP, Dell, and IBM. OEMs
supply and preconfigure all of the hardware, including the storage to support the data
warehouse functionality. The Parallel Data Warehouse Edition uses a shared-nothing
Massively Parallel Processing (MPP) architecture to support data warehouses from
10TB to hundreds of terabytes in size. As more scalability is required, additional
compute and storage nodes can be added to the data warehouse.
As you would expect, the Parallel Data Warehouse Edition is integrated with SQL
Server Integration Services (SSIS), SQL Server Analysis Services (SSAS), and SQL
Server Reporting Services (SSRS). For more in-depth information about the SQL
Server 2008 R2 Parallel Data Warehouse Edition, see "Getting Started with Parallel
Data Warehouse,” June 2010.
SQL Server 2008 Compact Edition (Free) SQL Server 2008 Compact Edition (Free)
15
2.7 : Stakeholders
Stakeholders are anyone who has an interest in the project. Project stakeholders are
individuals and organizations that are actively involved in the project, or whose interests may
be affected as a result of project execution or project completion. They may also exert influence
over the project’s objectives and outcomes. The project management team must identify the
stakeholders, determine their requirements and expectations, and, to the extent possible,
manage their influence in relation to the requirements to ensure a successful project.
Project Developers is one who develops software for customer. In my project I am the
first stakeholder i.e. Project Developer.
2. Project customer :
Project User group are those people who use the software on daily basis for the Project
Customer.
4. Project Testers :
Project Testers are those who test the software. In my project myself, my project guide
are the Project Testers.
16
2.8 : Gantt Chart
Gantt Chart :
17
CHAPTER : 3
System Analysis
18
3.0 : SYSTEM ANALYSIS
The goal of systems analysis is to determine where the problem is in attempt to fix the
system. This step involves breaking down the system in different pieces and drawing
diagrams to analyze the situation. Analysts project goals, breaking down functions that
need to be created, and attempt to engage users so that definite requirements can be
defined.
Design: In systems design functions and operations are described in detail, including
screen layouts, business rules, process diagrams and other documentation. The output
of this stage will describe the new system as a collection of modules or subsystems.
Coding: Modular and subsystem programming code will be accomplished during this
stage. This stage is intermingled with the next in that individual modules will need
testing before integration to the main project. Planning in software life cycle involves
setting goals, defining targets, establishing schedules, and estimating budgets for an
entire software project.
Testing: The code is tested at various levels in software testing. Unit, system and user
acceptance testing are often performed. This is a grey area as many different opinions
exist as to what the stages of testing are and how much if any iteration occurs. Iteration
is not generally part of the waterfall model, but usually some occurs at this stage.
Operations and Maintenance: The deployment of the system includes changes and
enhancements before the decommissioning or sunset of the system. Maintaining the
system is an important aspect of SDLC. As key personnel change positions in the
organization, new changes will be implemented, which will require
19
3.1 : Fact Finding
Introduction :
The Current System is the manual one, hence is not speedy, accurate, efficient as well
as time consuming. An essential part of the system analysis, which enables the developer to
understand & the system correctly. It is undertaken to obtain details of the system. To
understand the physical flow of the information through the current system. Collect various
information through various fact finding techniques. Identify the procedural difficulties
experienced by the user. Study the bottlenecks find out the redundant work being performed in
the system.
1. Interviews :
Information was obtained from the employees at the organization by interviewing
them at the location and time convention both.
2. Document Searching :
An extensive study of existing document an official correspondence was done to
understand the present working status of organization.
20
DIAGRAMS :
A use case diagram at its simplest is a representation of a user's interaction with the
system that shows the relationship between the user and the different use cases in
which the user is involved.
21
3.4 : ER Diagram
22
3.5 : Activity Diagram
Activity diagram is another important diagram in UML to describe the dynamic aspects of
the system. Activity diagram is basically a flowchart to represent the flow from
one activity to another activity. The activity can be described as an operation of the system.
The control flow is drawn from one operation to another.
23
24
3.6 : Class Diagam
25
3.7 : Sequence Diagram
A sequence diagram shows object interactions arranged in time sequence. It depicts the
objects and classes involved in the scenario and the sequence of messages exchanged
between the objects needed to carry out the functionality of the scenario.
26
Sequence diagram for user :
27
CHAPTER : 4
System Design.
28
4.0 : System Design
4.1 : ER Diagram
29
4.2 : Converting ERD to Tables
30
CHAPTER: 5
System Coding
31
5.3 : Validations.
Validation is important part of any web application. User's input must always be validated
before sending across different layers of the application.
Client side validation is good but we have to be dependent on browser and scripting language
support.
Client side validation is considered convenient for users as they get instant feedback. The
main advantage is that it prevents a page from being postback to the server until the client
validation is executed successfully.
For developer point of view serve side is preferable because it will not fail, it is not dependent
on browser and scripting language.
You can use ASP.NET validation, which will ensure client, and server validation. It work on
both end; first it will work on client validation and than on server validation. At any cost
server validation will work always whether client validation is executed or not. So you have a
safety of validation check.
For client script .NET used JavaScript. WebUIValidation.js file is used for client validation
by .NET
An important aspect of creating ASP.NET Web pages for user input is to be able to check
that the information users enter is valid. ASP.NET provides a set of validation controls that
provide an easy-to-use but powerful way to check for errors and, if necessary, display
messages to the user.
1. RequiredFieldValidation Control
2. CompareValidator Control
32
3. RangeValidator Control
4. RegularExpressionValidator Control
5. CustomValidator Control
6. ValidationSummary
All validation controls are rendered in form as <span> (label are referred as <span> on client
by server)
33
5.4: Test Cases
For forms:
For controls:
34
CHAPTER : 6
System Implementation
35
6.1 : Form Designing.
Home Page (Default.Aspx)
The Home Page Are The Startup Page Of The Website .
In This Page You Can View The Meetings, Calculate Mentanence,View Expensesand Add
Queries And Complaints
Basically It Is Designed For All The Users Of The Buildings
36
Maintenance (Calculate maintenance.Aspx)
The Maintenance Page Are The Page Which Is Use To Calculate The Mentainace Of Room
User Can Calculater There Own Mentanance Accoring To Mentanace Rate Which Is
Provcideds By The Admin
37
View Meeting Page (View Meeting.Aspx)
The View Meeting Page Conatins The Information About The Meeing
Held Meeting
Sheaduled Meeting
HELD MEETING
THE HELD MEETING IS USED TO SHOW THE MEETING WHICH IS HELD BEFORE.
38
SHEDULED MEETING
39
VIEW EVENT (Viewevent.Aspx)
40
ADD QUERY (Query.aspx)
41
Admin login page (Admin.aspx)
Admin login page conatins all the information about
Room
Owner
Mentainance rate
Mentainace payments
Add expences
View expences
Meetings
Complaints
42
Add Room (Addroom.aspx)
43
Add owner (Addowner.aspx)
The add owner is used for adding the owner with respet to the room no
44
View owner (Viewowner.aspx)
View owner is used to view the owner of the room
45
View maintenance (viewmaintance.aspx)
46
Add event (event.aspx)
47
Add salary (salary.aspx)
48
Complaint response (response.aspx)
49
Employee
50
View entries (viewentries.aspx)
51
Coding
Home Page(Default.aspx)
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
}
52
About Us Page(About us.aspx)
<%@ Page Title="About Us" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true"
CodeFile="About.aspx.cs" Inherits="About" %>
</strong>
</p>
</asp:Content>
53
Calculate Maintenance Page(CalculateMaintenance.aspx)
54
Amount:
<asp:TextBox ID="AmountTextBox" runat="server" Text='<%# Bind("Amount")
%>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#FFCC99" />
<HeaderStyle BackColor="#FF9933" Font-Bold="True" ForeColor="White"
Font-Size="X-Large" Font-Strikeout="False" Font-Underline="False" Height="40px"
HorizontalAlign="Center" Wrap="False" />
<InsertItemTemplate>
Year:
<asp:DropDownList ID="ddl1" runat="server" AutoPostBack="True"
DataSourceID="sds2" DataTextField="Year" DataValueField="Year"
SelectedValue='<%# Bind("Year") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="sds2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [Year] FROM [tblMaintance]">
</asp:SqlDataSource>
<br />
Month:
<asp:DropDownList ID="ddl2" runat="server" AutoPostBack="True"
DataSourceID="sds3" DataTextField="Month" DataValueField="Month"
SelectedValue='<%# Bind("Month") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="sds3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [Month] FROM [tblMaintance] WHERE
([Year] = @Year)">
<SelectParameters>
<asp:ControlParameter ControlID="ddl1" Name="Year"
PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<br />
Rate:
<asp:TextBox ID="RateTextBox" runat="server" ReadOnly="True"
Text='<%# Bind("Rate") %>' />
<br />
BuildingNo:
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource5" DataTextField="BulidingNo"
DataValueField="BulidingNo">
</asp:DropDownList>
55
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [BulidingNo] FROM [tblbuilding]">
</asp:SqlDataSource>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("BulidingNo") %>'
Visible="False"></asp:Label>
<br />
WingNo:
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource6" DataTextField="WingNo"
DataValueField="WingNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [WingNo] FROM [tblWing] WHERE
([BuildingNo] = @BuildingNo)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("WingNo") %>'
Visible="False"></asp:Label>
<br />
RoomNo:
<asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource7" DataTextField="RoomNo"
DataValueField="RoomNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource7" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [RoomNo] FROM [tblRoom] WHERE (([BuildingNo]
= @BuildingNo) AND ([WingNo] = @WingNo))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
<asp:ControlParameter ControlID="DropDownList3" Name="WingNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("RoomNo") %>'
Visible="False"></asp:Label>
<asp:DropDownList ID="DropDownList5" runat="server"
DataSourceID="SqlDataSource8" DataTextField="Size" DataValueField="Size">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource8" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Size] FROM [tblRoom] WHERE (([BuildingNo] =
@BuildingNo) AND ([WingNo] = @WingNo) AND ([RoomNo] = @RoomNo))">
<SelectParameters>
56
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
<asp:ControlParameter ControlID="DropDownList3" Name="WingNo"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList4" Name="RoomNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:TextBox ID="SizeTextBox" runat="server" Text='<%# Bind("Size") %>'
Visible="False" />
<br />
<asp:Button ID="Button1" runat="server" Text="Calculate" />
<br />
Amount:
<asp:TextBox ID="AmountTextBox" runat="server" ReadOnly="True"
Text='<%# Bind("Amount") %>' />
<br />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Month:
<asp:Label ID="MonthLabel" runat="server" Text='<%# Bind("Month") %>' />
<br />
Year:
<asp:Label ID="YearLabel" runat="server" Text='<%# Bind("Year") %>' />
<br />
BulidingNo:
<asp:Label ID="BulidingNoLabel" runat="server"
Text='<%# Bind("BulidingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>' />
<br />
RoomNo:
<asp:Label ID="RoomNoLabel" runat="server" Text='<%# Bind("RoomNo") %>' />
<br />
Size:
<asp:Label ID="SizeLabel" runat="server" Text='<%# Bind("Size") %>' />
<br />
Rate:
<asp:Label ID="RateLabel" runat="server" Text='<%# Bind("Rate") %>' />
<br />
ReceivedFrom:
<asp:Label ID="ReceivedFromLabel" runat="server"
Text='<%# Bind("ReceivedFrom") %>' />
<br />
Amount:
<asp:Label ID="AmountLabel" runat="server" Text='<%# Bind("Amount") %>' />
57
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblPayment] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblPayment] ([Month], [Year], [BulidingNo],
[WingNo], [RoomNo], [Size], [Rate], [ReceivedFrom], [Amount]) VALUES (@Month,
@Year, @BulidingNo, @WingNo, @RoomNo, @Size, @Rate, @ReceivedFrom,
@Amount)"
SelectCommand="SELECT * FROM [tblPayment]"
UpdateCommand="UPDATE [tblPayment] SET [Month] = @Month, [Year] = @Year,
[BulidingNo] = @BulidingNo, [WingNo] = @WingNo, [RoomNo] = @RoomNo, [Size] =
@Size, [Rate] = @Rate, [ReceivedFrom] = @ReceivedFrom, [Amount] = @Amount
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="String" />
<asp:Parameter Name="Rate" Type="Int32" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="String" />
<asp:Parameter Name="Rate" Type="Int32" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
58
</asp:SqlDataSource>
</asp:Content>
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
DropDownList y = (DropDownList)FormView1.FindControl("ddl1");
DropDownList m = (DropDownList)FormView1.FindControl("ddl2");
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
SqlCommand cmd1 = new SqlCommand("Select RatePerSqarFoot from tblMaintance
where year='" + y.SelectedValue + "' and month='" + m.SelectedValue + "'", conn);
int rate = (int)cmd1.ExecuteScalar();
TextBox r = (TextBox)FormView1.FindControl("RateTextBox");
r.Text = rate.ToString();
59
txtamt.Text = amt.ToString();
}
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
}
60
View Meeting(ViewMeeting.aspx)
61
SelectCommand="SELECT [Id], [Title], [Date], [Time], [Venue], [Description]
FROM [tblMeeting] WHERE ([Date] >= @Date) ORDER BY [Id]">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" DbType="Date" Name="Date"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
</p>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None"
BorderWidth="1px"
CellPadding="3" CellSpacing="2" DataKeyNames="Id"
datasourceid="SqlDataSource2"
Visible="False">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False"
ReadOnly="True" SortExpression="Id" />
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
<asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time" />
<asp:BoundField DataField="Venue" HeaderText="Venue" SortExpression="Venue"
/>
<asp:BoundField DataField="Description" HeaderText="Description"
SortExpression="Description" />
<asp:BoundField DataField="Minutes" HeaderText="Minutes"
SortExpression="Minutes" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FFF1D4" />
<SortedAscendingHeaderStyle BackColor="#B95C30" />
<SortedDescendingCellStyle BackColor="#F1E5CE" />
<SortedDescendingHeaderStyle BackColor="#93451F" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [tblMeeting] WHERE ([Date] <= @Date)
ORDER BY [Id] DESC">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" DbType="Date" Name="Date"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
<p>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</p>
</asp:Content>
62
Java Code for View Meeting
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
63
View maintenance(View maintenance.aspx)
64
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Maintance" Name="Type" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
65
View Event Page(Eventpage.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeFile="ViewEvents.aspx.cs" Inherits="Admin_ViewEvents"
%>
66
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Event" Name="Type" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
67
View Salary Page(ViewSalary.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeFile="ViewSalary.aspx.cs" Inherits="Admin_ViewSalary"
%>
68
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Emp" Name="Type" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
69
Add query page(Add query.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master"
AutoEventWireup="true" CodeFile="Query.aspx.cs" Inherits="Query" %>
70
<asp:Label ID="QueryLabel" runat="server" Text='<%# Bind("Query") %>' />
<br />
date:
<asp:Label ID="dateLabel" runat="server" Text='<%# Bind("date") %>' />
<br />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Id], [Query], [date] FROM [tblComplaints]"
DeleteCommand="DELETE FROM [tblComplaints] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblComplaints] ([Query], [date]) VALUES (@Query,
@date)"
UpdateCommand="UPDATE [tblComplaints] SET [Query] = @Query, [date] = @date
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Query" Type="String" />
<asp:Parameter DbType="Date" Name="date" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Query" Type="String" />
<asp:Parameter DbType="Date" Name="date" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
71
View complaint(View complaint۔aspx)
72
<asp:Parameter Name="Respone" Type="String" />
<asp:Parameter DbType="Date" Name="date" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
}
}
73
Login page(Login.aspx)
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
74
<p>
<asp:Label ID="PasswordLabel" runat="server"
AssociatedControlID="Password">Password:</asp:Label>
<asp:TextBox ID="Password" runat="server" CssClass="passwordEntry"
TextMode="Password"></asp:TextBox>
<asp:RequiredFieldValidator ID="PasswordRequired" runat="server"
ControlToValidate="Password"
CssClass="failureNotification" ErrorMessage="Password is required."
ToolTip="Password is required."
ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
</p>
<p>
<asp:CheckBox ID="RememberMe" runat="server"/>
<asp:Label ID="RememberMeLabel" runat="server"
AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
</p>
</fieldset>
<p class="submitButton">
<asp:Button ID="LoginButton" runat="server" CommandName="Login"
Text="Log In" ValidationGroup="LoginUserValidationGroup"/>
</p>
</div>
</LayoutTemplate>
</asp:Login>
</asp:Content>
75
Admin home page(Admin .aspx)
}
}
76
Add room(Add room.aspx)
77
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
BuildingNo:
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource5" DataTextField="BulidingNo"
DataValueField="BulidingNo" SelectedValue='<%# Bind("BuildingNo") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [BulidingNo] FROM [tblbuilding]">
</asp:SqlDataSource>
<br />
WingNo:
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource6" DataTextField="WingNo"
DataValueField="WingNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [WingNo] FROM [tblWing] WHERE
([BuildingNo] = @BuildingNo)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("WingNo") %>'
Visible="False"></asp:Label>
<br />
RoomNo:
<asp:TextBox ID="RoomNoTextBox" runat="server" Text='<%#
Bind("RoomNo") %>' />
<br />
Size:
<asp:TextBox ID="SizeTextBox" runat="server" Text='<%# Bind("Size") %>' />
<br />
Intercom:
<asp:TextBox ID="IntercomTextBox" runat="server"
Text='<%# Bind("Intercom") %>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
78
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
BuildingNo:
<asp:Label ID="BuildingNoLabel" runat="server"
Text='<%# Bind("BuildingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>'
/>
<br />
RoomNo:
<asp:Label ID="RoomNoLabel" runat="server" Text='<%# Bind("RoomNo") %>'
/>
<br />
Size:
<asp:Label ID="SizeLabel" runat="server" Text='<%# Bind("Size") %>' />
<br />
Intercom:
<asp:Label ID="IntercomLabel" runat="server" Text='<%# Bind("Intercom") %>'
/>
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server"
CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblRoom] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblRoom] ([BuildingNo], [WingNo], [RoomNo],
[Size], [Intercom]) VALUES (@BuildingNo, @WingNo, @RoomNo, @Size, @Intercom)"
SelectCommand="SELECT * FROM [tblRoom]"
UpdateCommand="UPDATE [tblRoom] SET [BuildingNo] = @BuildingNo,
[WingNo] = @WingNo, [RoomNo] = @RoomNo, [Size] = @Size, [Intercom] = @Intercom
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="BuildingNo" Type="Int32" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
79
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="Intercom" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="BuildingNo" Type="Int32" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="Intercom" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:FormView ID="FormView2" runat="server" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
CellPadding="3"
CellSpacing="2" DataKeyNames="Id" DataSourceID="SqlDataSource2"
DefaultMode="Insert" GridLines="Both" Visible="False" Width="378px"
HeaderText="Add Building" oniteminserted="FormView1_ItemInserted">
<EditItemTemplate>
Id:
<asp:Label ID="IdLabel1" runat="server" Text='<%# Eval("Id") %>' />
<br />
BulidingNo:
<asp:TextBox ID="BulidingNoTextBox" runat="server"
Text='<%# Bind("BulidingNo") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
BulidingNo:
<asp:TextBox ID="BulidingNoTextBox" runat="server"
Text='<%# Bind("BulidingNo") %>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
BulidingNo:
<asp:Label ID="BulidingNoLabel" runat="server"
80
Text='<%# Bind("BulidingNo") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server"
CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblbuilding] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblbuilding] ([BulidingNo]) VALUES
(@BulidingNo)"
SelectCommand="SELECT * FROM [tblbuilding]"
UpdateCommand="UPDATE [tblbuilding] SET [BulidingNo] = @BulidingNo
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="BulidingNo" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="BulidingNo" Type="Int32" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:FormView ID="FormView3" runat="server" BackColor="#DEBA84"
BorderColor="#DEBA84" BorderStyle="None" BorderWidth="1px"
CellPadding="3"
CellSpacing="2" DataKeyNames="Id" DataSourceID="SqlDataSource3"
DefaultMode="Insert" GridLines="Both" Visible="False" Width="381px"
HeaderText="Add Wing" oniteminserted="FormView1_ItemInserted">
<EditItemTemplate>
Id:
<asp:Label ID="IdLabel1" runat="server" Text='<%# Eval("Id") %>' />
<br />
BuildingNo:
<asp:TextBox ID="BuildingNoTextBox" runat="server"
Text='<%# Bind("BuildingNo") %>' />
<br />
WingNo:
<asp:TextBox ID="WingNoTextBox" runat="server" Text='<%# Bind("WingNo")
%>' />
81
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
BuildingNo:
<asp:DropDownList ID="DropDownList1" runat="server"
DataSourceID="SqlDataSource4" DataTextField="BulidingNo"
DataValueField="BulidingNo" SelectedValue='<%# Bind("BuildingNo") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource4" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [BulidingNo] FROM
[tblbuilding]"></asp:SqlDataSource>
<br />
WingNo:
<asp:TextBox ID="WingNoTextBox" runat="server" Text='<%# Bind("WingNo")
%>' />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
BuildingNo:
<asp:Label ID="BuildingNoLabel" runat="server"
Text='<%# Bind("BuildingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>'
/>
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server"
CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
82
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblWing] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblWing] ([BuildingNo], [WingNo]) VALUES
(@BuildingNo, @WingNo)"
SelectCommand="SELECT * FROM [tblWing]"
UpdateCommand="UPDATE [tblWing] SET [BuildingNo] = @BuildingNo,
[WingNo] = @WingNo WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="BuildingNo" Type="Int32" />
<asp:Parameter Name="WingNo" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="BuildingNo" Type="Int32" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</p>
</asp:Content>
83
FormView2.Visible = false;
FormView3.Visible = false;
}
else
if (RadioButtonList1.SelectedIndex == 1)
{
FormView2.Visible = true;
FormView1.Visible = false;
FormView3.Visible = false;
}
else
{
FormView3.Visible = true;
FormView2.Visible = false;
FormView1.Visible = false;
}
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
Response.Redirect("~/Admin/AddRoom.aspx");
}
protected void Button1_Click(object sender, EventArgs e)
{
Response.Redirect("~/Admin/AddRoom.aspx");
}
}
84
View room (Viewroom.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewRoom.aspx.cs" Inherits="Admin_ViewRoom" %>
85
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="Intercom" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="BuildingNo" Type="Int32" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="Intercom" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
86
Add owner(Addowner.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="AddOwner.aspx.cs" Inherits="Admin_AddOwner" %>
87
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
Name:
<asp:TextBox ID="NameTextBox0" runat="server" Text='<%# Bind("Name") %>' />
<br />
BuildingNo:
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource5" DataTextField="BulidingNo"
DataValueField="BulidingNo" SelectedValue='<%# Bind("BuildingNo") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [BulidingNo] FROM [tblbuilding]">
</asp:SqlDataSource>
<br />
WingNo:
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource6" DataTextField="WingNo"
DataValueField="WingNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [WingNo] FROM [tblWing] WHERE
([BuildingNo] = @BuildingNo)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("WingNo") %>'
Visible="False"></asp:Label>
<br />
RoomNo:
<asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource7" DataTextField="RoomNo"
DataValueField="RoomNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource7" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [RoomNo] FROM [tblRoom] WHERE (([BuildingNo]
= @BuildingNo) AND ([WingNo] = @WingNo))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
88
PropertyName="SelectedValue" Type="Int32" />
<asp:ControlParameter ControlID="DropDownList3" Name="WingNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("RoomNo") %>'
Visible="False"></asp:Label>
<asp:DropDownList ID="DropDownList5" runat="server"
DataSourceID="SqlDataSource8" DataTextField="Size" DataValueField="Size"
Visible="False">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource8" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Size] FROM [tblRoom] WHERE (([BuildingNo] =
@BuildingNo) AND ([WingNo] = @WingNo) AND ([RoomNo] = @RoomNo))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
<asp:ControlParameter ControlID="DropDownList3" Name="WingNo"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList4" Name="RoomNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:TextBox ID="SizeTextBox" runat="server" Text='<%# Bind("Size") %>'
Visible="False" />
<br />
EmailId:
<asp:TextBox ID="EmailIdTextBox0" runat="server"
Text='<%# Bind("EmailId") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
Display="Dynamic" ErrorMessage="Enter Email"
ControlToValidate="EmailIdTextBox0">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="EmailIdTextBox0" Display="Dynamic"
ErrorMessage="Enter Correct Email"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*">*</asp:RegularExpressionValidator>
<br />
PhoneNo:
<asp:TextBox ID="PhoneNoTextBox0" runat="server"
Text='<%# Bind("PhoneNo") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="PhoneNoTextBox0" Display="Dynamic"
ErrorMessage="Enter Phone Number">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ControlToValidate="PhoneNoTextBox0" Display="Dynamic"
ErrorMessage="Enter Correct Phone Number" ValidationExpression="[0-
9]{10}"></asp:RegularExpressionValidator>
<br />
89
Gender:
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatDirection="Horizontal" SelectedValue='<%# Bind("Gender") %>'>
<asp:ListItem Selected="True">Male</asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
</asp:RadioButtonList>
<br />
<asp:Button ID="InsertButton0" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:Button ID="InsertCancelButton0" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Name:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
<br />
BuildingNo:
<asp:Label ID="BuildingNoLabel" runat="server"
Text='<%# Bind("BuildingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>' />
<br />
RoomNo:
<asp:Label ID="RoomNoLabel" runat="server" Text='<%# Bind("RoomNo") %>' />
<br />
Size:
<asp:Label ID="SizeLabel" runat="server" Text='<%# Bind("Size") %>' />
<br />
EmailId:
<asp:Label ID="EmailIdLabel" runat="server" Text='<%# Bind("EmailId") %>' />
<br />
PhoneNo:
<asp:Label ID="PhoneNoLabel" runat="server" Text='<%# Bind("PhoneNo") %>' />
<br />
Gender:
<asp:Label ID="GenderLabel" runat="server" Text='<%# Bind("Gender") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#000099" HorizontalAlign="Center" />
90
<RowStyle BackColor="#CC00FF" ForeColor="#6600CC" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblOwner] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblOwner] ([Name], [BuildingNo], [WingNo],
[RoomNo], [Size], [EmailId], [PhoneNo], [Gender]) VALUES (@Name, @BuildingNo,
@WingNo, @RoomNo, @Size, @EmailId, @PhoneNo, @Gender)"
SelectCommand="SELECT * FROM [tblOwner]"
91
{
protected void Page_Load(object sender, EventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
}
92
View room(Viewroom.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewRoom.aspx.cs" Inherits="Admin_ViewRoom" %>
93
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="Intercom" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="BuildingNo" Type="Int32" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="Intercom" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
94
Add owner(Addowner.aspx)
95
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
Name:
<asp:TextBox ID="NameTextBox0" runat="server" Text='<%# Bind("Name") %>' />
<br />
BuildingNo:
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource5" DataTextField="BulidingNo"
DataValueField="BulidingNo" SelectedValue='<%# Bind("BuildingNo") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [BulidingNo] FROM [tblbuilding]">
</asp:SqlDataSource>
<br />
WingNo:
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource6" DataTextField="WingNo"
DataValueField="WingNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [WingNo] FROM [tblWing] WHERE
([BuildingNo] = @BuildingNo)">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("WingNo") %>'
Visible="False"></asp:Label>
<br />
RoomNo:
<asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource7" DataTextField="RoomNo"
DataValueField="RoomNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource7" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [RoomNo] FROM [tblRoom] WHERE (([BuildingNo]
= @BuildingNo) AND ([WingNo] = @WingNo))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
96
<asp:ControlParameter ControlID="DropDownList3" Name="WingNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("RoomNo") %>'
Visible="False"></asp:Label>
<asp:DropDownList ID="DropDownList5" runat="server"
DataSourceID="SqlDataSource8" DataTextField="Size" DataValueField="Size"
Visible="False">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource8" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT [Size] FROM [tblRoom] WHERE (([BuildingNo] =
@BuildingNo) AND ([WingNo] = @WingNo) AND ([RoomNo] = @RoomNo))">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList2" Name="BuildingNo"
PropertyName="SelectedValue" Type="Int32" />
<asp:ControlParameter ControlID="DropDownList3" Name="WingNo"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList4" Name="RoomNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:TextBox ID="SizeTextBox" runat="server" Text='<%# Bind("Size") %>'
Visible="False" />
<br />
EmailId:
<asp:TextBox ID="EmailIdTextBox0" runat="server"
Text='<%# Bind("EmailId") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
Display="Dynamic" ErrorMessage="Enter Email"
ControlToValidate="EmailIdTextBox0">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="EmailIdTextBox0" Display="Dynamic"
ErrorMessage="Enter Correct Email"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-
.]\w+)*">*</asp:RegularExpressionValidator>
<br />
PhoneNo:
<asp:TextBox ID="PhoneNoTextBox0" runat="server"
Text='<%# Bind("PhoneNo") %>' />
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="PhoneNoTextBox0" Display="Dynamic"
ErrorMessage="Enter Phone Number">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ControlToValidate="PhoneNoTextBox0" Display="Dynamic"
ErrorMessage="Enter Correct Phone Number" ValidationExpression="[0-
9]{10}"></asp:RegularExpressionValidator>
<br />
Gender:
97
<asp:RadioButtonList ID="RadioButtonList1" runat="server"
RepeatDirection="Horizontal" SelectedValue='<%# Bind("Gender") %>'>
<asp:ListItem Selected="True">Male</asp:ListItem>
<asp:ListItem>Female</asp:ListItem>
</asp:RadioButtonList>
<br />
<asp:Button ID="InsertButton0" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:Button ID="InsertCancelButton0" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Name:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
<br />
BuildingNo:
<asp:Label ID="BuildingNoLabel" runat="server"
Text='<%# Bind("BuildingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>' />
<br />
RoomNo:
<asp:Label ID="RoomNoLabel" runat="server" Text='<%# Bind("RoomNo") %>' />
<br />
Size:
<asp:Label ID="SizeLabel" runat="server" Text='<%# Bind("Size") %>' />
<br />
EmailId:
<asp:Label ID="EmailIdLabel" runat="server" Text='<%# Bind("EmailId") %>' />
<br />
PhoneNo:
<asp:Label ID="PhoneNoLabel" runat="server" Text='<%# Bind("PhoneNo") %>' />
<br />
Gender:
<asp:Label ID="GenderLabel" runat="server" Text='<%# Bind("Gender") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#000099" HorizontalAlign="Center" />
<RowStyle BackColor="#CC00FF" ForeColor="#6600CC" />
98
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblOwner] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblOwner] ([Name], [BuildingNo], [WingNo],
[RoomNo], [Size], [EmailId], [PhoneNo], [Gender]) VALUES (@Name, @BuildingNo,
@WingNo, @RoomNo, @Size, @EmailId, @PhoneNo, @Gender)"
SelectCommand="SELECT * FROM [tblOwner]"
99
protected void Page_Load(object sender, EventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
}
100
View owner(Viewowner.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewOwner.aspx.cs" Inherits="Admin_ViewOwner"
%>
101
UpdateCommand="UPDATE [tblOwner] SET [Name] = @Name, [BuildingNo] =
@BuildingNo, [WingNo] = @WingNo, [RoomNo] = @RoomNo, [Size] = @Size, [EmailId]
= @EmailId, [PhoneNo] = @PhoneNo, [Gender] = @Gender WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="BuildingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="EmailId" Type="String" />
<asp:Parameter Name="PhoneNo" Type="String" />
<asp:Parameter Name="Gender" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="BuildingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="Int32" />
<asp:Parameter Name="EmailId" Type="String" />
<asp:Parameter Name="PhoneNo" Type="String" />
<asp:Parameter Name="Gender" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
}
}
102
Add maintenance(Addmaintenance.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="AddMaintanceRate.aspx.cs"
Inherits="Admin_AddMaintanceRate" %>
103
<asp:DropDownList ID="DropDownList6" runat="server"
SelectedValue='<%# Bind("Month") %>'>
<asp:ListItem>Jan</asp:ListItem>
<asp:ListItem>Feb</asp:ListItem>
<asp:ListItem>Mar</asp:ListItem>
<asp:ListItem>Apr</asp:ListItem>
<asp:ListItem>May</asp:ListItem>
<asp:ListItem>Jun</asp:ListItem>
<asp:ListItem>Jul</asp:ListItem>
<asp:ListItem>Aug</asp:ListItem>
<asp:ListItem>Sep</asp:ListItem>
<asp:ListItem>Oct</asp:ListItem>
<asp:ListItem>Nov</asp:ListItem>
<asp:ListItem>Dec</asp:ListItem>
</asp:DropDownList>
</td>
<td>
</td>
</tr>
<tr>
<td>
Year:</td>
<td>
<asp:TextBox ID="YearTextBox" runat="server" Text='<%# Bind("Year")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="YearTextBox" Display="Dynamic"
ErrorMessage="Enter Correct Year">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="YearTextBox" Display="Dynamic"
ErrorMessage="Enter Correct Year" ValidationExpression="[0-2][0-0][0-
3][0-9]">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
Rate/SqFt:</td>
<td>
<asp:TextBox ID="RatePerSqarFootTextBox" runat="server"
Text='<%# Bind("RatePerSqarFoot") %>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="RatePerSqarFootTextBox" Display="Dynamic"
ErrorMessage="Enter Rate">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2"
runat="server"
104
ControlToValidate="RatePerSqarFootTextBox" Display="Dynamic"
ErrorMessage="Enter Correct Rate" ValidationExpression="[0-9][0-9][0-
9]">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:Button ID="InsertCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</td>
<td>
</td>
</tr>
</table>
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
<br /> <br />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Month:
<asp:Label ID="MonthLabel" runat="server" Text='<%# Bind("Month") %>' />
<br />
Year:
<asp:Label ID="YearLabel" runat="server" Text='<%# Bind("Year") %>' />
<br />
RatePerSqarFoot:
<asp:Label ID="RatePerSqarFootLabel" runat="server"
Text='<%# Bind("RatePerSqarFoot") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
105
<asp:SqlDataSource ID="SqlDataSource9" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblMaintance] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblMaintance] ([Month], [Year], [RatePerSqarFoot])
VALUES (@Month, @Year, @RatePerSqarFoot)"
SelectCommand="SELECT * FROM [tblMaintance]"
UpdateCommand="UPDATE [tblMaintance] SET [Month] = @Month, [Year] =
@Year, [RatePerSqarFoot] = @RatePerSqarFoot WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="RatePerSqarFoot" Type="Int32" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="RatePerSqarFoot" Type="Int32" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
//DropDownList d6 = (DropDownList)FormView1.FindControl("DropDownList6");
//d6.SelectedIndex = System.DateTime.Now.Month-1;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
Response.Redirect("ViewRate.aspx");
//Page_Load(sender, e);
}
106
//{
// TextBox yyyy = (TextBox)FormView1.FindControl("YearTextBox");
// yyyy.Text = System.DateTime.Now.Year.ToString();
// DropDownList d6 = (DropDownList)FormView1.FindControl("DropDownList6");
// d6.SelectedIndex = System.DateTime.Now.Month+1;
//}
//DropDownList d6 = (DropDownList)FormView1.FindControl("DropDownList6");
//d6.SelectedIndex = System.DateTime.Now.Month + 1;
}
}
107
View maintenance(Viewmaintenance.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewMaintance.aspx.cs" Inherits="ViewMaintance"
%>
108
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Maintance" Name="Type" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
109
Paid mantenence(Paidmantenence.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="PaidMaintance.aspx.cs"
Inherits="Admin_PaidMaintance" %>
110
<asp:BoundField DataField="Amount" HeaderText="Amount"
SortExpression="Amount" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FFF1D4" />
<SortedAscendingHeaderStyle BackColor="#B95C30" />
<SortedDescendingCellStyle BackColor="#F1E5CE" />
<SortedDescendingHeaderStyle BackColor="#93451F" />
</asp:GridView>
<br />
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblPayment] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblPayment] ([BulidingNo], [WingNo], [RoomNo],
[ReceivedFrom], [Amount]) VALUES (@BulidingNo, @WingNo, @RoomNo,
@ReceivedFrom, @Amount)"
SelectCommand="SELECT [Id], [BulidingNo], [WingNo], [RoomNo], [ReceivedFrom],
[Amount] FROM [tblPayment] WHERE (([Year] = @Year) AND ([Month] = @Month))"
UpdateCommand="UPDATE [tblPayment] SET [BulidingNo] = @BulidingNo, [WingNo]
= @WingNo, [RoomNo] = @RoomNo, [ReceivedFrom] = @ReceivedFrom, [Amount] =
@Amount WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1" Name="Year"
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList2" Name="Month"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
111
</asp:Content>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
protected void Button1_Click(object sender, EventArgs e)
{
}
}
112
Unpaid(Unpaid.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="Unpaid.aspx.cs" Inherits="Admin_Unpaid" %>
113
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FFF1D4" />
<SortedAscendingHeaderStyle BackColor="#B95C30" />
<SortedDescendingCellStyle BackColor="#F1E5CE" />
<SortedDescendingHeaderStyle BackColor="#93451F" />
</asp:GridView>
</p>
</asp:Content>
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.Configuration;
using System.Data;
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
//string cmd = "Select o.Id as ID, o.emailid as EmailId, o.phoneno As PhoneNo from
tblOwner o, tblPayment p where p.month='" + DropDownList2.SelectedValue + "' and
p.year='" + DropDownList1.SelectedValue + "' and p.roomno<>o.roomno and
p.wingno<>o.wingno and p.BulidingNo<>o.BuildingNo";
string cmd = "SELECT Id, Name, BuildingNo, WingNo, RoomNo, Size, EmailId,
PhoneNo, Gender FROM tblOwner WHERE (Id NOT IN (SELECT o.Id FROM tblOwner
AS o INNER JOIN tblPayment AS p ON p.RoomNo = o.RoomNo AND
p.WingNo = o.WingNo AND p.BulidingNo = o.BuildingNo WHERE (p.Month =
'"+DropDownList2.SelectedValue+"') AND (p.Year =
'"+DropDownList1.SelectedValue+"')))";
SqlDataAdapter objada = new SqlDataAdapter(cmd, conn);
114
DataTable objtbl = new DataTable();
objada.Fill(objtbl);
GridView1.DataSource = objtbl;
GridView1.DataBind();
}
}
115
Payment(Payment.aspx)
116
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
Year:
<asp:DropDownList ID="ddl1" runat="server" AutoPostBack="True"
DataSourceID="sds2" DataTextField="Year" DataValueField="Year"
SelectedValue='<%# Bind("Year") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="sds2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [Year] FROM [tblMaintance]">
</asp:SqlDataSource>
<br />
Month:
<asp:DropDownList ID="ddl2" runat="server" AutoPostBack="True"
DataSourceID="sds3" DataTextField="Month" DataValueField="Month"
SelectedValue='<%# Bind("Month") %>'>
</asp:DropDownList>
<asp:SqlDataSource ID="sds3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [Month] FROM [tblMaintance] WHERE
([Year] = @Year)">
<SelectParameters>
<asp:ControlParameter ControlID="ddl1" Name="Year"
PropertyName="SelectedValue"
Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<br />
Rate:
<asp:TextBox ID="RateTextBox" runat="server" ReadOnly="True"
Text='<%# Bind("Rate") %>' />
<br />
BuildingNo:
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource5" DataTextField="BuildingNo"
DataValueField="BuildingNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [BuildingNo] FROM [tblOwner]">
</asp:SqlDataSource>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("BuildingNo") %>'
117
Visible="False"></asp:Label>
<br />
WingNo:
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource6" DataTextField="WingNo"
DataValueField="WingNo">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
118
PropertyName="SelectedValue" Type="String" />
<asp:ControlParameter ControlID="DropDownList4" Name="RoomNo"
PropertyName="SelectedValue" Type="String" />
</SelectParameters>
</asp:SqlDataSource>
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Calculate" />
<br />
<br />
Amount:
<asp:TextBox ID="AmountTextBox" runat="server" ReadOnly="True"
Text='<%# Bind("Amount") %>' />
<br />
<asp:TextBox ID="SizeTextBox" runat="server" Text='<%# Bind("Size") %>'
Visible="False" />
<br />
ReceivedFrom:
<asp:TextBox ID="ReceivedFromTextBox" runat="server"
Text='<%# Bind("ReceivedFrom") %>' />
<br />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Month:
<asp:Label ID="MonthLabel" runat="server" Text='<%# Bind("Month") %>' />
<br />
Year:
<asp:Label ID="YearLabel" runat="server" Text='<%# Bind("Year") %>' />
<br />
BulidingNo:
<asp:Label ID="BulidingNoLabel" runat="server"
Text='<%# Bind("BulidingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>' />
<br />
RoomNo:
<asp:Label ID="RoomNoLabel" runat="server" Text='<%# Bind("RoomNo") %>' />
<br />
Size:
<asp:Label ID="SizeLabel" runat="server" Text='<%# Bind("Size") %>' />
<br />
Rate:
119
<asp:Label ID="RateLabel" runat="server" Text='<%# Bind("Rate") %>' />
<br />
ReceivedFrom:
<asp:Label ID="ReceivedFromLabel" runat="server"
Text='<%# Bind("ReceivedFrom") %>' />
<br />
Amount:
<asp:Label ID="AmountLabel" runat="server" Text='<%# Bind("Amount") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblPayment] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblPayment] ([Month], [Year], [BulidingNo],
[WingNo], [RoomNo], [Size], [Rate], [ReceivedFrom], [Amount]) VALUES (@Month,
@Year, @BulidingNo, @WingNo, @RoomNo, @Size, @Rate, @ReceivedFrom,
@Amount)"
SelectCommand="SELECT * FROM [tblPayment]"
UpdateCommand="UPDATE [tblPayment] SET [Month] = @Month, [Year] = @Year,
[BulidingNo] = @BulidingNo, [WingNo] = @WingNo, [RoomNo] = @RoomNo, [Size] =
@Size, [Rate] = @Rate, [ReceivedFrom] = @ReceivedFrom, [Amount] = @Amount
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="String" />
<asp:Parameter Name="Rate" Type="Int32" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="BulidingNo" Type="String" />
120
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="String" />
<asp:Parameter Name="Rate" Type="Int32" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
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.Configuration;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
DropDownList y = (DropDownList)FormView1.FindControl("ddl1");
DropDownList m = (DropDownList)FormView1.FindControl("ddl2");
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
SqlCommand cmd1 = new SqlCommand("Select RatePerSqarFoot from tblMaintance
where year='" + y.SelectedValue + "' and month='" + m.SelectedValue + "'", conn);
121
int rate = (int)cmd1.ExecuteScalar();
TextBox r = (TextBox)FormView1.FindControl("RateTextBox");
r.Text = rate.ToString();
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
protected void Button1_Click(object sender, EventArgs e)
{
122
}
}
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.Configuration;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
DropDownList y = (DropDownList)FormView1.FindControl("ddl1");
DropDownList m = (DropDownList)FormView1.FindControl("ddl2");
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
SqlCommand cmd1 = new SqlCommand("Select RatePerSqarFoot from tblMaintance
where year='" + y.SelectedValue + "' and month='" + m.SelectedValue + "'", conn);
int rate = (int)cmd1.ExecuteScalar();
TextBox r = (TextBox)FormView1.FindControl("RateTextBox");
r.Text = rate.ToString();
123
}
protected void FormView1_ItemInserting(object sender, FormViewInsertEventArgs e)
{
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
DropDownList d5 = (DropDownList)FormView1.FindControl("DropDownList5");
TextBox size = (TextBox)FormView1.FindControl("SizeTextBox");
size.Text = d5.SelectedValue;
}
protected void Button1_Click(object sender, EventArgs e)
{
}
}
124
View payment(Viewpayment.aspx)
125
SelectCommand="SELECT * FROM [tblPayment] ORDER BY [Id] DESC"
UpdateCommand="UPDATE [tblPayment] SET [Month] = @Month, [Year] = @Year,
[BulidingNo] = @BulidingNo, [WingNo] = @WingNo, [RoomNo] = @RoomNo, [Size] =
@Size, [Rate] = @Rate, [ReceivedFrom] = @ReceivedFrom, [Amount] = @Amount
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="String" />
<asp:Parameter Name="Rate" Type="Int32" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Month" Type="String" />
<asp:Parameter Name="Year" Type="String" />
<asp:Parameter Name="BulidingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Size" Type="String" />
<asp:Parameter Name="Rate" Type="Int32" />
<asp:Parameter Name="ReceivedFrom" Type="String" />
<asp:Parameter Name="Amount" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
126
Add maintenance(Addmaintenance.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="Maintance.aspx.cs" Inherits="Admin_Maintance" %>
127
<InsertItemTemplate>
<table class="style1">
<tr>
<td>
Title:</td>
<td>
<asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
BorderColor="Red" ControlToValidate="TitleTextBox"
Display="Dynamic"
ErrorMessage="Please Enter Title">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Date:</td>
<td>
<asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date")
%>' />
<asp:CalendarExtender ID="DateTextBox_CalendarExtender" runat="server"
Enabled="True" TargetControlID="DateTextBox">
</asp:CalendarExtender>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BorderColor="Red" ControlToValidate="DateTextBox"
Display="Dynamic"
ErrorMessage="Please Enter Date">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Cost:</td>
<td>
<asp:TextBox ID="CostTextBox" runat="server" Text='<%# Bind("Cost")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
BorderColor="Red" ControlToValidate="TitleTextBox"
Display="Dynamic"
ErrorMessage="Please Enter Cost">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Description:</td>
128
<td>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Description")
%>'></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
BorderColor="Red" ControlToValidate="TextBox1" Display="Dynamic"
ErrorMessage="Please Enter Description">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
</td>
<td>
<asp:Button ID="InsertCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</td>
<td>
</td>
</tr>
</table>
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Title:
<asp:Label ID="TitleLabel" runat="server" Text='<%# Bind("Title") %>' />
<br />
Date:
<asp:Label ID="DateLabel" runat="server" Text='<%# Bind("Date") %>' />
<br />
Cost:
<asp:Label ID="CostLabel" runat="server" Text='<%# Bind("Cost") %>' />
<br />
Description:
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Bind("Description") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
129
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblExpenses] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblExpenses] ([Title], [Date], [Cost], [Description])
VALUES (@Title, @Date, @Cost, @Description)"
SelectCommand="SELECT * FROM [tblExpenses]"
UpdateCommand="UPDATE [tblExpenses] SET [Title] = @Title, [Date] = @Date,
[Cost] = @Cost, [Description] = @Description WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
</asp:Content>
130
Java code forAdd maintenance
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.Configuration;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
131
Event(Event.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="Events.aspx.cs" Inherits="Admin_Events" %>
132
<table class="style1">
<tr>
<td>
EventName:</td>
<td>
<asp:TextBox ID="TitleTextBox0" runat="server" Text='<%# Bind("Title")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
BorderColor="Red" ControlToValidate="TitleTextBox0"
Display="Dynamic"
ErrorMessage="Enter Event Name">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Date:</td>
<td>
<asp:TextBox ID="DateTextBox0" runat="server" Text='<%# Bind("Date")
%>' />
<asp:CalendarExtender ID="DateTextBox0_CalendarExtender"
runat="server"
Enabled="True" TargetControlID="DateTextBox0">
</asp:CalendarExtender>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BorderColor="Red" ControlToValidate="DateTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Cost">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Cost:</td>
<td>
<asp:TextBox ID="CostTextBox0" runat="server" Text='<%# Bind("Cost")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
BorderColor="Red" ControlToValidate="CostTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Cost">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Description:</td>
133
<td>
<asp:TextBox ID="DescriptionTextBox0" runat="server"
Text='<%# Bind("Description") %>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
BorderColor="Red" ControlToValidate="DescriptionTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Description">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
</td>
<td>
<asp:Button ID="InsertCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</td>
<td>
</td>
</tr>
</table>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Title:
<asp:Label ID="TitleLabel" runat="server" Text='<%# Bind("Title") %>' />
<br />
Date:
<asp:Label ID="DateLabel" runat="server" Text='<%# Bind("Date") %>' />
<br />
Cost:
<asp:Label ID="CostLabel" runat="server" Text='<%# Bind("Cost") %>' />
<br />
Description:
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Bind("Description") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
134
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblExpenses] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblExpenses] ([Title], [Date], [Cost], [Description])
VALUES (@Title, @Date, @Cost, @Description)"
SelectCommand="SELECT * FROM [tblExpenses]"
UpdateCommand="UPDATE [tblExpenses] SET [Title] = @Title, [Date] = @Date,
[Cost] = @Cost, [Description] = @Description WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
135
Java code for Event
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.Configuration;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
136
Add salary(Addsalary.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="Employee.aspx.cs" Inherits="Admin_Employee" %>
137
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
<table class="style1">
<tr>
<td>
EmaployeeName:</td>
<td>
<asp:TextBox ID="TitleTextBox0" runat="server" Text='<%# Bind("Title")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
BorderColor="Red" ControlToValidate="TitleTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Employee
Name">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Date:</td>
<td>
<asp:TextBox ID="DateTextBox0" runat="server" Text='<%# Bind("Date")
%>' />
<asp:CalendarExtender ID="DateTextBox0_CalendarExtender"
runat="server"
Enabled="True" TargetControlID="DateTextBox0">
</asp:CalendarExtender>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BorderColor="Red" ControlToValidate="DateTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Date">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2">
Cost:</td>
<td class="style2">
<asp:TextBox ID="CostTextBox0" runat="server" Text='<%# Bind("Cost")
%>' />
</td>
<td class="style2">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
BorderColor="Red" ControlToValidate="CostTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Cost">*</asp:RequiredFieldValidator>
138
</td>
</tr>
<tr>
<td>
Description:</td>
<td>
<asp:TextBox ID="DescriptionTextBox0" runat="server"
Text='<%# Bind("Description") %>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
BorderColor="Red" ControlToValidate="DescriptionTextBox0"
Display="Dynamic"
ErrorMessage="Please Enter Description">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
</td>
<td>
<asp:Button ID="InsertCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</td>
<td>
</td>
</tr>
</table>
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Title:
<asp:Label ID="TitleLabel" runat="server" Text='<%# Bind("Title") %>' />
<br />
Date:
<asp:Label ID="DateLabel" runat="server" Text='<%# Bind("Date") %>' />
<br />
Cost:
<asp:Label ID="CostLabel" runat="server" Text='<%# Bind("Cost") %>' />
<br />
Description:
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Bind("Description") %>' />
<br />
139
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource3" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblExpenses] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblExpenses] ([Title], [Date], [Cost], [Description])
VALUES (@Title, @Date, @Cost, @Description)"
SelectCommand="SELECT * FROM [tblExpenses]"
UpdateCommand="UPDATE [tblExpenses] SET [Title] = @Title, [Date] = @Date,
[Cost] = @Cost, [Description] = @Description WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
</asp:Content>
140
Java code for Addsalary
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.Configuration;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
141
View events(Viewevents.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewEvents.aspx.cs" Inherits="Admin_ViewEvents"
%>
142
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Event" Name="Type" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
143
View salary(Viewsalary.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewSalary.aspx.cs" Inherits="Admin_ViewSalary"
%>
144
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Emp" Name="Type" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter Name="Date" Type="String" />
<asp:Parameter Name="Cost" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
} }
145
Add meeting(Addmeeting.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="AddMeeting.aspx.cs" Inherits="Admin_AddMeeting"
%>
146
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
<table class="style1">
<tr>
<td>
Title:</td>
<td>
<asp:TextBox ID="TitleTextBox" runat="server" Text='<%# Bind("Title")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TitleTextBox" Display="Dynamic"
ErrorMessage="Enter Title">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1"
runat="server"
ControlToValidate="TitleTextBox" Display="Dynamic"
ErrorMessage="Alphabates Only" ValidationExpression="[A-Z a-
z]+">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
Date:</td>
<td>
<asp:TextBox ID="DateTextBox" runat="server" Text='<%# Bind("Date")
%>' />
<asp:CalendarExtender ID="DateTextBox_CalendarExtender" runat="server"
Enabled="True" TargetControlID="DateTextBox">
</asp:CalendarExtender>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="DateTextBox" Display="Dynamic"
ErrorMessage="Enter date">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Time:</td>
<td>
<asp:TextBox ID="TimeTextBox" runat="server" Text='<%# Bind("Time")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
147
ControlToValidate="TimeTextBox" Display="Dynamic"
ErrorMessage="Enter Time">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
Venue:</td>
<td>
<asp:TextBox ID="VenueTextBox" runat="server" Text='<%# Bind("Venue")
%>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server"
ControlToValidate="VenueTextBox" Display="Dynamic"
ErrorMessage="Enter Venue">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator2"
runat="server"
ControlToValidate="VenueTextBox" Display="Dynamic"
ErrorMessage="Alphabates Only" ValidationExpression="[A-Z a-
z]+">*</asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td>
Description:
</td>
<td>
<asp:TextBox ID="DescriptionTextBox" runat="server" Height="60px"
Text='<%# Bind("Description") %>' TextMode="MultiLine"
Width="228px" />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
ControlToValidate="DescriptionTextBox" Display="Dynamic"
ErrorMessage="Enter Decsription">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:Button ID="InsertCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
<br />
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
148
</td>
<td>
</td>
</tr>
</table>
<br />
<br /> <br /> <br />
<br />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Title:
<asp:Label ID="TitleLabel" runat="server" Text='<%# Bind("Title") %>' />
<br />
Date:
<asp:Label ID="DateLabel" runat="server" Text='<%# Bind("Date") %>' />
<br />
Time:
<asp:Label ID="TimeLabel" runat="server" Text='<%# Bind("Time") %>' />
<br />
Venue:
<asp:Label ID="VenueLabel" runat="server" Text='<%# Bind("Venue") %>' />
<br />
Description:
<asp:Label ID="DescriptionLabel" runat="server"
Text='<%# Bind("Description") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server"
CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblMeeting] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblMeeting] ([Title], [Date], [Time], [Venue],
[Description]) VALUES (@Title, @Date, @Time, @Venue, @Description)"
SelectCommand="SELECT [Id], [Title], [Date], [Time], [Venue], [Description] FROM
[tblMeeting]"
UpdateCommand="UPDATE [tblMeeting] SET [Title] = @Title, [Date] = @Date,
[Time] = @Time, [Venue] = @Venue, [Description] = @Description WHERE [Id] = @Id">
149
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter DbType="Date" Name="Date" />
<asp:Parameter Name="Time" Type="String" />
<asp:Parameter Name="Venue" Type="String" />
<asp:Parameter Name="Description" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="Title" Type="String" />
<asp:Parameter DbType="Date" Name="Date" />
<asp:Parameter Name="Time" Type="String" />
<asp:Parameter Name="Venue" Type="String" />
<asp:Parameter Name="Description" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
150
title = (TextBox)FormView1.FindControl("TitleTextBox");
date = (TextBox)FormView1.FindControl("DateTextBox");
time = (TextBox)FormView1.FindControl("TimeTextBox");
venue = (TextBox)FormView1.FindControl("VenueTextBox");
// Response.Write(title.Text + " " + time.Text +" " + date.Text + " " + venue.Text);
SqlCommand cmd = new SqlCommand("select emailid from tblowner", conn);
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
string em = sdr.GetString(0);
//Response.Write(em);
try
{
String EmailAddress;
EmailAddress = em;
MailMessage mail = new MailMessage();
mail.To.Add(EmailAddress);
mail.From = new MailAddress("[email protected]");
mail.Subject = "Meeting Schedule";
string Body = "Title : " + title.Text + "<br>" + "Date : " +date.Text + "<br> Time :
" +time.Text + "<br> Venue : " +venue.Text ;
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential
("[email protected]", "suryainfoedge");
//Or your Smtp Email ID and Password
smtp.EnableSsl = true;
smtp.Send(mail);
}
catch
{
Response.Write("No Internet Connection....");
}
}
}
}
151
Cancle meating (Canclemeating.aspx)
152
<asp:TextBox ID="TextBox1" runat="server" Height="62px" TextMode="MultiLine"
Width="229px"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BorderColor="Red" ControlToValidate="TextBox1" Display="Dynamic"
ErrorMessage="Please Enter Description">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style3">
<asp:Label ID="Label1" runat="server" Text="Label" Visible="False"></asp:Label>
</td>
<td class="style2">
</td>
<td>
</td>
</tr>
<tr>
<td class="style3">
</td>
<td class="style2">
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
Text="Cancel Meeting" />
</td>
<td>
</td>
</tr>
</table>
</p>
<asp:ValidationSummary ID="ValidationSummary1" runat="server"
ShowMessageBox="True" ShowSummary="False" />
<p>
</p>
<p>
</p>
<p>
</p></asp:Content>
153
public partial class Admin_Cancel_Meeting : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = System.DateTime.Now.Date.ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
// Response.Write(title.Text + " " + time.Text +" " + date.Text + " " + venue.Text);
SqlCommand cmd = new SqlCommand("select emailid from tblowner", conn);
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read())
{
string em = sdr.GetString(0);
//Response.Write(em);
try
{
String EmailAddress;
EmailAddress = em;
MailMessage mail = new MailMessage();
mail.To.Add(EmailAddress);
mail.From = new MailAddress("[email protected]");
mail.Subject = "Meeting Canceled";
string Body = "Date : " + DropDownList1.SelectedValue + "<br>Reason : " +
TextBox1.Text;
mail.Body = Body;
mail.IsBodyHtml = true;
SmtpClient smtp = new SmtpClient();
smtp.Host = "smtp.gmail.com"; //Or Your SMTP Server Address
smtp.Credentials = new System.Net.NetworkCredential
("[email protected]", "suryainfoedge");
//Or your Smtp Email ID and Password
smtp.EnableSsl = true;
smtp.Send(mail);
}
catch
{
Response.Write("No Internet Connection....");
}
} }}
154
View meeting(Viewmeeting.aspx)
155
SelectCommand="SELECT [Id], [Title], [Date], [Time], [Venue], [Description]
FROM [tblMeeting] WHERE ([Date] >= @Date) ORDER BY [Id]">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" DbType="Date" Name="Date"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
</p>
<asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False"
BackColor="#DEBA84" BorderColor="#DEBA84" BorderStyle="None"
BorderWidth="1px"
CellPadding="3" CellSpacing="2" DataKeyNames="Id"
datasourceid="SqlDataSource2"
Visible="False">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id" InsertVisible="False"
ReadOnly="True" SortExpression="Id" />
<asp:BoundField DataField="Title" HeaderText="Title" SortExpression="Title" />
<asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
<asp:BoundField DataField="Time" HeaderText="Time" SortExpression="Time" />
<asp:BoundField DataField="Venue" HeaderText="Venue" SortExpression="Venue"
/>
<asp:BoundField DataField="Description" HeaderText="Description"
SortExpression="Description" />
<asp:BoundField DataField="Minutes" HeaderText="Minutes"
SortExpression="Minutes" />
</Columns>
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
<SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<SortedAscendingCellStyle BackColor="#FFF1D4" />
<SortedAscendingHeaderStyle BackColor="#B95C30" />
<SortedDescendingCellStyle BackColor="#F1E5CE" />
<SortedDescendingHeaderStyle BackColor="#93451F" />
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource2" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [tblMeeting] WHERE ([Date] <= @Date)
ORDER BY [Id] DESC">
<SelectParameters>
<asp:ControlParameter ControlID="Label1" DbType="Date" Name="Date"
PropertyName="Text" />
</SelectParameters>
</asp:SqlDataSource>
<p>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</p>
</asp:Content>
156
Java code for View meeting
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
157
Replay (Replay.aspx)
158
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
BorderColor="Red" ControlToValidate="ResponeTextBox"
Display="Dynamic"
ErrorMessage="Please Enter Response">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
date:
</td>
<td>
<asp:TextBox ID="dateTextBox" runat="server" ReadOnly="True"
Text='<%# Bind("date") %>' />
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
BorderColor="Red" ControlToValidate="dateTextBox" Display="Dynamic"
ErrorMessage="Please Enter Date">*</asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
<td>
</td>
</tr>
<tr>
<td>
<asp:Button ID="UpdateButton" runat="server"
CausesValidation="True"
CommandName="Update" Text="Update" />
</td>
<td style="margin-left: 80px">
&nbs
p;
<asp:Button ID="UpdateCancelButton" runat="server"
CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
</td>
<td>
</td>
</tr>
</table>
<br /> <asp:ValidationSummary ID="ValidationSummary1"
runat="server"
159
ShowMessageBox="True" ShowSummary="False" />
<br /> <br />
<br />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
Query:
<asp:TextBox ID="QueryTextBox" runat="server" Text='<%# Bind("Query") %>'
Height="63px" ReadOnly="True" TextMode="MultiLine" Width="239px" />
<br />
Respone:
<asp:TextBox ID="ResponeTextBox" runat="server" Text='<%# Bind("Respone") %>'
Height="65px" TextMode="MultiLine" Width="230px" />
<br />
date:
<asp:TextBox ID="dateTextBox" runat="server" Text='<%# Bind("date") %>'
ReadOnly="True" />
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
Query:
<asp:Label ID="QueryLabel" runat="server" Text='<%# Bind("Query") %>' />
<br />
Respone:
<asp:Label ID="ResponeLabel" runat="server" Text='<%# Bind("Respone") %>' />
<br />
date:
<asp:Label ID="dateLabel" runat="server" Text='<%# Bind("date") %>' />
<br />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT * FROM [tblComplaints] WHERE ([Respone] = @Respone)"
DeleteCommand="DELETE FROM [tblComplaints] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblComplaints] ([Query], [Respone], [date])
VALUES (@Query, @Respone, @date)"
160
UpdateCommand="UPDATE [tblComplaints] SET [Query] = @Query, [Respone] =
@Respone, [date] = @date WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="Query" Type="String" />
<asp:Parameter Name="Respone" Type="String" />
<asp:Parameter DbType="Date" Name="date" />
</InsertParameters>
<SelectParameters>
<asp:Parameter DefaultValue="Pending" Name="Respone" Type="String" />
</SelectParameters>
<UpdateParameters>
<asp:Parameter Name="Query" Type="String" />
<asp:Parameter Name="Respone" Type="String" />
<asp:Parameter DbType="Date" Name="date" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
}
}
161
View complaint(Viewcomplaint.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Site.master"
AutoEventWireup="true" CodeFile="ViewComplaints.aspx.cs" Inherits="ViewComplaints"
%>
162
<asp:Parameter DbType="Date" Name="date" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
}
}
163
Entry guest(Entryguest.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Security/Site.master"
AutoEventWireup="true" CodeFile="Entry.aspx.cs" Inherits="Security_Entry" %>
164
<br />
DateTime:
<asp:TextBox ID="DateTimeTextBox" runat="server"
Text='<%# Bind("DateTime") %>' />
<br />
CallResponse:
<asp:TextBox ID="CallResponseTextBox" runat="server"
Text='<%# Bind("CallResponse") %>' />
<br />
<asp:LinkButton ID="UpdateButton" runat="server" CausesValidation="True"
CommandName="Update" Text="Update" />
<asp:LinkButton ID="UpdateCancelButton" runat="server"
CausesValidation="False" CommandName="Cancel" Text="Cancel" />
</EditItemTemplate>
<EditRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="White" />
<FooterStyle BackColor="#F7DFB5" ForeColor="#8C4510" />
<HeaderStyle BackColor="#A55129" Font-Bold="True" ForeColor="White" />
<InsertItemTemplate>
BuildingNo:
<asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource5" DataTextField="BuildingNo"
DataValueField="BuildingNo" SelectedValue='<%# Bind("BuildingNo") %>'
onselectedindexchanged="DropDownList2_SelectedIndexChanged">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource5" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="SELECT DISTINCT [BuildingNo] FROM [tblOwner]">
</asp:SqlDataSource>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("BulidingNo") %>'
Visible="False"></asp:Label>
<br />
WingNo:
<asp:DropDownList ID="DropDownList3" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource6" DataTextField="WingNo"
DataValueField="WingNo"
onselectedindexchanged="DropDownList3_SelectedIndexChanged">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource6" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
165
RoomNo:
<asp:DropDownList ID="DropDownList4" runat="server" AutoPostBack="True"
DataSourceID="SqlDataSource7" DataTextField="RoomNo"
DataValueField="RoomNo"
onselectedindexchanged="DropDownList4_SelectedIndexChanged">
</asp:DropDownList>
<asp:SqlDataSource ID="SqlDataSource7" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
166
Text='<%# Bind("VehicalNo") %>' />
<br />
DateTime:
<asp:TextBox ID="DateTimeTextBox" runat="server" ReadOnly="True"
Text='<%# Bind("DateTime") %>' />
<br />
CallResponse:
<asp:DropDownList ID="DropDownList6" runat="server"
SelectedValue='<%# Bind("CallResponse") %>'>
<asp:ListItem>Dont Allow</asp:ListItem>
<asp:ListItem>Allow</asp:ListItem>
<asp:ListItem>Coming to Receive</asp:ListItem>
</asp:DropDownList>
<br />
<asp:LinkButton ID="InsertButton" runat="server" CausesValidation="True"
CommandName="Insert" Text="Insert" />
<asp:LinkButton ID="InsertCancelButton" runat="server" CausesValidation="False"
CommandName="Cancel" Text="Cancel" />
<br />
<br />
</InsertItemTemplate>
<ItemTemplate>
Id:
<asp:Label ID="IdLabel" runat="server" Text='<%# Eval("Id") %>' />
<br />
BuildingNo:
<asp:Label ID="BuildingNoLabel" runat="server"
Text='<%# Bind("BuildingNo") %>' />
<br />
WingNo:
<asp:Label ID="WingNoLabel" runat="server" Text='<%# Bind("WingNo") %>' />
<br />
RoomNo:
<asp:Label ID="RoomNoLabel" runat="server" Text='<%# Bind("RoomNo") %>' />
<br />
Name:
<asp:Label ID="NameLabel" runat="server" Text='<%# Bind("Name") %>' />
<br />
ContactNo:
<asp:Label ID="ContactNoLabel" runat="server" Text='<%# Bind("ContactNo") %>' />
<br />
InterCom:
<asp:Label ID="InterComLabel" runat="server" Text='<%# Bind("InterCom") %>' />
<br />
NoOfPerson:
<asp:Label ID="NoOfPersonLabel" runat="server"
Text='<%# Bind("NoOfPerson") %>' />
<br />
Vehical:
<asp:Label ID="VehicalLabel" runat="server" Text='<%# Bind("Vehical") %>' />
167
<br />
VehicalNo:
<asp:Label ID="VehicalNoLabel" runat="server" Text='<%# Bind("VehicalNo") %>' />
<br />
DateTime:
<asp:Label ID="DateTimeLabel" runat="server" Text='<%# Bind("DateTime") %>' />
<br />
CallResponse:
<asp:Label ID="CallResponseLabel" runat="server"
Text='<%# Bind("CallResponse") %>' />
<br />
<asp:LinkButton ID="EditButton" runat="server" CausesValidation="False"
CommandName="Edit" Text="Edit" />
<asp:LinkButton ID="DeleteButton" runat="server" CausesValidation="False"
CommandName="Delete" Text="Delete" />
<asp:LinkButton ID="NewButton" runat="server" CausesValidation="False"
CommandName="New" Text="New" />
</ItemTemplate>
<PagerStyle ForeColor="#8C4510" HorizontalAlign="Center" />
<RowStyle BackColor="#FFF7E7" ForeColor="#8C4510" />
</asp:FormView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
DeleteCommand="DELETE FROM [tblGuest] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblGuest] ([BuildingNo], [WingNo], [RoomNo],
[Name], [ContactNo], [InterCom], [NoOfPerson], [Vehical], [VehicalNo], [DateTime],
[CallResponse]) VALUES (@BuildingNo, @WingNo, @RoomNo, @Name, @ContactNo,
@InterCom, @NoOfPerson, @Vehical, @VehicalNo, @DateTime, @CallResponse)"
SelectCommand="SELECT * FROM [tblGuest]"
UpdateCommand="UPDATE [tblGuest] SET [BuildingNo] = @BuildingNo, [WingNo] =
@WingNo, [RoomNo] = @RoomNo, [Name] = @Name, [ContactNo] = @ContactNo,
[InterCom] = @InterCom, [NoOfPerson] = @NoOfPerson, [Vehical] = @Vehical,
[VehicalNo] = @VehicalNo, [DateTime] = @DateTime, [CallResponse] = @CallResponse
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="BuildingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="ContactNo" Type="String" />
<asp:Parameter Name="InterCom" Type="String" />
<asp:Parameter Name="NoOfPerson" Type="String" />
<asp:Parameter Name="Vehical" Type="String" />
<asp:Parameter Name="VehicalNo" Type="String" />
<asp:Parameter DbType="Date" Name="DateTime" />
<asp:Parameter Name="CallResponse" Type="String" />
</InsertParameters>
168
<UpdateParameters>
<asp:Parameter Name="BuildingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="ContactNo" Type="String" />
<asp:Parameter Name="InterCom" Type="String" />
<asp:Parameter Name="NoOfPerson" Type="String" />
<asp:Parameter Name="Vehical" Type="String" />
<asp:Parameter Name="VehicalNo" Type="String" />
<asp:Parameter DbType="Date" Name="DateTime" />
<asp:Parameter Name="CallResponse" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
169
SqlConnection conn = new
SqlConnection(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionSt
ring);
conn.Open();
SqlCommand cmd = new SqlCommand("select COALESCE(name, 'Not allocated')
from tblowner where buildingno='" + d2.SelectedValue + "' and wingno='" +
d3.SelectedValue + "' and roomno='" + l2.Text + "'", conn);
String name;
try
{
name = cmd.ExecuteScalar().ToString();
}
catch
{
name="Not allocate";
}
conn.Close();
170
{
intercom = cmd3.ExecuteScalar().ToString();
}
catch
{
intercom="Not allocated";
}
conn.Close();
TextBox txtintercom = (TextBox)FormView1.FindControl("InterComTextBox");
txtintercom.Text = intercom;
}
protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
{
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
171
name = "Not allocate";
}
conn.Close();
172
vehicalno.Visible = false;
else
vehicalno.Visible = true;
}
protected void DropDownList2_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList d2 = (DropDownList)FormView1.FindControl("DropDownList2");
Label l3 = (Label)FormView1.FindControl("Label3");
l3.Text = d2.SelectedValue;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
173
try
{
phone = cmd1.ExecuteScalar().ToString();
}
catch
{
phone = "Not allocated";
}
conn.Close();
TextBox txtphone = (TextBox)FormView1.FindControl("ContactNoTextBox");
txtphone.Text = phone;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
174
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
175
conn.Open();
SqlCommand cmd3 = new SqlCommand("select COALESCE(intercom, 'Not
allocated')from tblroom where buildingno='" + d2.SelectedValue + "' and wingno='" +
d3.SelectedValue + "' and roomno='" + l2.Text + "'", conn);
string intercom;
try
{
intercom = cmd3.ExecuteScalar().ToString();
}
catch
{
intercom = "Not allocated";
}
conn.Close();
TextBox txtintercom = (TextBox)FormView1.FindControl("InterComTextBox");
txtintercom.Text = intercom;
DropDownList d3 = (DropDownList)FormView1.FindControl("DropDownList3");
Label l1 = (Label)FormView1.FindControl("Label1");
l1.Text = d3.SelectedValue;
DropDownList d4 = (DropDownList)FormView1.FindControl("DropDownList4");
Label l2 = (Label)FormView1.FindControl("Label2");
l2.Text = d4.SelectedValue;
176
{
name = cmd.ExecuteScalar().ToString();
}
catch
{
name = "Not allocate";
}
conn.Close();
177
txtintercom.Text = intercom;
}
}
178
View guest(Viewguest.aspx)
<%@ Page Title="" Language="C#" MasterPageFile="~/Security/Site.master"
AutoEventWireup="true" CodeFile="View.aspx.cs" Inherits="Security_View" %>
179
DeleteCommand="DELETE FROM [tblGuest] WHERE [Id] = @Id"
InsertCommand="INSERT INTO [tblGuest] ([BuildingNo], [WingNo], [RoomNo],
[Name], [ContactNo], [InterCom], [NoOfPerson], [Vehical], [VehicalNo], [DateTime],
[CallResponse]) VALUES (@BuildingNo, @WingNo, @RoomNo, @Name, @ContactNo,
@InterCom, @NoOfPerson, @Vehical, @VehicalNo, @DateTime, @CallResponse)"
SelectCommand="SELECT * FROM [tblGuest] ORDER BY [Id] DESC"
UpdateCommand="UPDATE [tblGuest] SET [BuildingNo] = @BuildingNo, [WingNo] =
@WingNo, [RoomNo] = @RoomNo, [Name] = @Name, [ContactNo] = @ContactNo,
[InterCom] = @InterCom, [NoOfPerson] = @NoOfPerson, [Vehical] = @Vehical,
[VehicalNo] = @VehicalNo, [DateTime] = @DateTime, [CallResponse] = @CallResponse
WHERE [Id] = @Id">
<DeleteParameters>
<asp:Parameter Name="Id" Type="Int32" />
</DeleteParameters>
<InsertParameters>
<asp:Parameter Name="BuildingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="ContactNo" Type="String" />
<asp:Parameter Name="InterCom" Type="String" />
<asp:Parameter Name="NoOfPerson" Type="String" />
<asp:Parameter Name="Vehical" Type="String" />
<asp:Parameter Name="VehicalNo" Type="String" />
<asp:Parameter DbType="Date" Name="DateTime" />
<asp:Parameter Name="CallResponse" Type="String" />
</InsertParameters>
<UpdateParameters>
<asp:Parameter Name="BuildingNo" Type="String" />
<asp:Parameter Name="WingNo" Type="String" />
<asp:Parameter Name="RoomNo" Type="String" />
<asp:Parameter Name="Name" Type="String" />
<asp:Parameter Name="ContactNo" Type="String" />
<asp:Parameter Name="InterCom" Type="String" />
<asp:Parameter Name="NoOfPerson" Type="String" />
<asp:Parameter Name="Vehical" Type="String" />
<asp:Parameter Name="VehicalNo" Type="String" />
<asp:Parameter DbType="Date" Name="DateTime" />
<asp:Parameter Name="CallResponse" Type="String" />
<asp:Parameter Name="Id" Type="Int32" />
</UpdateParameters>
</asp:SqlDataSource>
</asp:Content>
180
Java code for Viewguest
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
}
}
181
CHAPTER: 7
Future Enhancement
182
7.1 : FUTURE ENHANCEMENT
This project can be enhanced further by adding online payment facility for the
members to reduce the extra work of the admin.
The software is flexible enough to be modified and implemented as per future
requirements.
We have tried our best to pre- sent this free and user–friendly website to Society
members.
Message and Email alerts for various happenings in the society can be added to the
system so that users do not miss the updates and happenings of the society.
183
CHAPTER: 8
Conclusion
184
8.1: Conclusion
System helps to keep all the data about customers and supplier to be stored in
computer and there is no need to do paper work.
Data is going to be preserved carefully for longer period hence proper backup is
required otherwise there is chance of losing entries.
There are also chances that calculation error can occur which can cause huge
problem.
The System allows the user to add about new supplier machine, material to order.
It also allows entering the received material information, material return
information, working payment information.
185
CHAPTER: 9
Reference
186
9.1: Reference:
1 ) http://www.w3schools.com
2 ) http://www.wikipedia.com
3 ) docs.oracle.com/javase/tutorial/
4 ) www.sqlservercentral.com
5 ) https://www.visualstudio.com/
6 ) https://Microsoft.net.msdn
7 ) https://www.tutorialspoint.com/csharp/
187