You are on page 1of 52

Modern Agriculture Management

Abstract:

Present day farming frameworks have been produced utilization of compost, soil,
climate, crop turn, and hereditary control of production plants. Each training is utilized
for soil, farming framework each relies upon the others and requirement for utilizing the
others. Crafted by manure in a horticultural generation, has been vital to the
advancement of these practices. The diverse module more innovation in agribusiness.
Client points of interest and issues better place tackled for an officer. Development
processor general supplier proposal farming is that it will proceed all through the future,
accommodating the individuals who require us most.

Introduction

E-Farming is a web application developed for farmers. This application gives suppose to the
village farmers who want to use this facility and who want to learn how is it possible and how
they can use e-farming to sell their products. If the farmers have knowledge of computer then
they can directly register in the site and sell their product otherwise they can contact
company’s computer professional who will schedule classes to teach the basics of computers
and internet. They can know how they can open this site and register with it and sell their
products online etc. E-Farming is a project developed to build a website which will help farmers
from to sell their products to different cities through online. Farmers can use this facility and
can learn how is it possible and how they can use e-farming to sell their products. Agriculture
Management System is to help farmers by providing all kinds agriculture related information
in the website. Agriculture Management System is farmer management website application
which helps farmers to give best-practice farming processes. It helps farmers to improve their
productivity and profitability. It enables farmers to sell their productions through online and
farmers can purchase tools and seeds directly from seller. Farmers can view labors profile and
they can hire labors.
EXISTING SYSTEM:

Client enlistment after login, inquiry name, message Sending for an officer. Officer enlistment
after login number of client inquiry sending just a single zone officer one by one client data is
seen after recommendation supplier.

Drawbacks:

1. User Problem one officer understood extra time.

2. Officer issue not understood for new innovation.

PROPOSED SYSTEM:

Client enrollment after login inquiry distinctive field, different message subtle elements diverse
picture file upload sending for various city officer sending. officer enlistment after login in a city
in light of question see so extraordinary client details timing sending so client requirement for
details time-saving. officer distinctive city utilized numerous zone sending details.

Advantages:

1. Admin the client requirement for details timing utilized and time spared.

2. Formers can know the demand for particular food.


Modules
1. Farmers: In this module is used to farmers to register before login this page and know
the latest new like demand of the food product and farming techniques.
2. Admin: the admin module is used to manage the farmers and farms, and also
monitoring the agricultural details such as total need for particular food and total land
details in the system. Answering the farmers query.
3. Query: Every farmer to generate the query to the admin. Each query has a particular
identification. And it will be processed by the system admin.
4. Lands: This module is used to add the land details. Every farmers has a one or more
lands for agriculture, each lands has own identification and soil.
5. Crops: Admin will calculate the total need for particular crop. Produced foods are stored
to the database so the demand of particular food is reduced.
6. Suggestion: The admin will answer the farmers query each query has one or more
suggestions. This way is used farmers to know the demands.

2.4 SYSTEM REQUIREMENT SPECIFICATION


2.4.1 HARDWARE SPECIFICATION
 Main Processor : 2GHz

 Ram : 512 MB (min)

 Hard Disk : 80 GB

2.4.2 SOFTWARE SPECIFICATION


 Language : C#

 Front End : ASP.Net

 IDE : Visual Studio

 Operating System : Windows 7 32 Bit


2.5 Feasibility Study

Feasibility study is the test of a system proposal according to its workability, impact on the
organization, ability to meet user needs, and effective use of recourses. It focuses on the evaluation of
existing system and procedures analysis of alternative candidate system cost estimates. Feasibility
analysis was done to determine whether the system would be feasible.

The development of a computer based system or a product is more likely plagued by


resources and delivery dates. Feasibility study helps the analyst to decide whether or not to
proceed, amend, postpone or cancel the project, particularly important when the project is large,
complex and costly.Once the analysis of the user requirement is complement, the system has to
check for the compatibility and feasibility of the software package that is aimed at. An important
outcome of the preliminary investigation is the determination that the system requested is
feasible.

2.5.1 Technical Feasibility:

The technology used can be developed with the current equipments and has the technical
capacity to hold the data required by the new system.

• This technology supports the modern trends of technology.

• Easily accessible, more secure technologies.


Technical feasibility on the existing system and to what extend it can support the proposed
addition. We can add new modules easily without affecting the Core Program. Most of parts are
running in the server using the concept of stored procedures.

2.5.2 Operational Feasibility:

This proposed system can easily implemented, as this is based on JSP coding (JAVA) &
HTML .The database created is with MySql server which is more secure and easy to handle.
The resources that are required to implement/install these are available. The personal of the
organization already has enough exposure to computers. So the project is operationally feasible.

2.5.3 Economical Feasibility:

Economic analysis is the most frequently used method for evaluating the effectiveness of a
new system. More commonly known cost/benefit analysis, the procedure is to determine the
benefits and savings that are expected from a candidate system and compare them with costs. If
benefits outweigh costs, then the decision is made to design and implement the system. An
entrepreneur must accurately weigh the cost versus benefits before taking an action. This system
is more economically feasible which assess the brain capacity with quick & online test. So it is
economically a good project.
2.6 FUNCTIONAL AND NON-FUNCTIONAL REQUIREMENTS

2.6.1 NON-FUNCTIONAL REQUIREMENTS

A Non-functional requirement for the system may be:


 Emails should be sent with a latency of no greater than 12 hours from such an activity.
The functional requirement is describing the behavior of the system as it relates to the system's
functionality. The non-functional requirement elaborates a performance characteristic of the
system.
Typically non-functional requirements fall into areas such as:

 Accessibility

 Capacity, current and forecast

 Compliance

 Documentation

 Disaster recovery

 Efficiency

 Effectiveness

 Extensibility

 Fault tolerance

 Interoperability

 Maintainability

 Privacy

 Portability

 Quality

 Reliability

 Resilience

 Response time
 Robustness

 Scalability

 Security

 Stability

 Supportability

 Testability
Non-functional requirements are sometimes defined in terms of metrics (something that can be
measured about the system) to make them more tangible. Non-functional requirements may also
describe aspects of the system that don't relate to it's execution, but rather to it's evolution over
time (e.g. maintainability, extensibility, documentation, etc).

2.6.2 FUNCTIONAL REQUIREMENTS

1. Functional requirements specifies a function that a system or system component must be


able to perform. It can be documented in various ways. The most common ones are written
descriptions in documents, and use cases.
2. Use cases can be textual enumeration lists as well as diagrams, describing user actions.
Each use case illustrates behavioural scenarios through one or more functional
requirements. Often, though, an analyst will begin by eliciting a set of use cases, from
which the analyst can derive the functional requirements that must be implemented to allow
a user to perform each use case.
3. Functional requirements is what a system is supposed to accomplish. It may be
 Calculations

 Technical details

 Data manipulation

 Data processing

 Other specific functionality


4. A typical functional requirement will contain a unique name and number, a brief
summary, and a rationale. This information is used to help the reader understand why the
requirement is needed, and to track the requirement through the development of the system.

TECHNICAL BACKGROUND

.NET Frame Work


The .NET Framework is a new computing platform that simplifies application
development in the highly distributed environment of the Internet. The .NET Framework
is designed to fulfil the following objectives:
 To provide a consistent object-oriented programming environment whether object code
is stored and executed locally, but Internet-distributed, or executed remotely.
 To provide a code-execution environment that guarantees safe execution of code,
including code created by an unknown or semi-trusted third party.
 To provide a code-execution environment that eliminates the performance problems of
scripted or interpreted environments.
 To make the developer experience consistent across widely varying types of
applications, such as Windows-based applications and Web-based applications.
 To build all communication on industry standards to ensure that code based on the .NET
Framework can integrate with any other code.
The .NET Framework has two main components: the common language runtime
and the .NET Framework class library. The common language runtime is the foundation
of the .NET Framework. One can think of the runtime as an agent that manages code at
execution time, providing core services such as memory management, thread
management, and remoting, while also enforcing strict type safely and other forms of
code accuracy that ensure security and robustness.
In fact, the concept of code management is a fundamental principle of the
runtime. Code that targets the runtime is known as managed code, while code that does
not target the runtime is known as unmanaged code.
The class library, the other main component of the .NET Framework, is a
comprehensive, object-oriented collection of reusable types that you can use to develop
applications ranging from traditional command-line or graphical Voter interface (GUI)
applications to applications based on the latest innovations provided by ASP.NET, such
as Web Forms and XML Web services.
The .NET Framework can be hosted by unmanaged components that load the
common language runtime into their processes and initiate the execution of managed
code, thereby creating a software environment that can exploit both managed and
unmanaged features.
The .NET Framework not only provides several runtime hosts, but also supports
the development of third-party runtime hosts.
The .NET Framework is a multi-language environment for building, deploying,
and running XML Web services and applications. It consists of three main parts:

ASP.NET
ASP.NET is more than the next version of Active Server Pages (ASP); it is a unified
web development platform that provides the services necessary for developers to build
enterprise-class Web applications. While ASP.NET is largely syntax compatible with ASP,
it also provides a new programming model and infrastructure for more secure, scalable
and stable applications. You can feel free to augment your existing ASP application by
incremental adding ASP.NET functionality to them.
ASP.NET is a compiled, .NET-based environment; you can author applications in
any .NET compatible language, including Visual Basic .NET, and Jscript .NET. Additionally,
the entire .NET Framework is available to any ASP.NET application. Developers can
easily access the benefits of these technologies, which include the managed common
language runtime environment, type safely, inheritance, and so on.
ASP.NET has been designed to work seamlessly with WYSIWYG HTML editors and
other programming tools, including Microsoft Visual Studio .NET. Not only does this
make Web development easier, but it is also provides all the benefits that these tools
have to offer, including a GUI that developers can use to drop server controls onto a
Web page and fully integrated debugging support.
Developers can use Web Forms or XML Web services when creating an ASP.NET
application, or combine these in any way they see fit. Each is supported by the same
infrastructure that allows you to use authentication schemes; caches frequently used
data, or customize your application’s configuration, to name only a few possibilities.
Web Forms allow you to build powerful forms-based Web pages. When building
these pages, you can use ASP.NET server controls to create common UI elements, and
program them for common tasks. These controls allow you to rapidly build a Web Form
out of reusable built-in or custom components, simplifying the code of a page.
An XML Web service provides the means to access server functionality remotely.
Using XML Web services, businesses can expose programmatic interfaces to their data
or business logic, which in turn can be obtained and manipulated by client and server
applications.
An XML Web services enable the exchange of data in client-server or server-
server scenarios, using standards like HTTP and XML messaging to move data across
firewalls. XML Web services are not tied to a particular component technology or
object-calling convention. As a result, programs written in any language, using any
component model, and running on any operating system can access XML Web services.
Each of these models can take full advantage of all ASP.NET features, as well as the
power of the .NET Framework and .NET Framework common language runtime. These
features and how you can use them are outlined as follows.
If you have ASP development skills, the new ASP.NET programming model will
seem very familiar to you. However, the ASP.NET Object model has changed significantly
from ASP, making it more structured and object-oriented. Unfortunately this means that
ASP.NET is not fully backward compatible; almost all existing ASP pages will have to be
modified to some extent in order to run under ASP.NET.
In addition, major changes to Visual Basic .NET means that existing ASP pages
written with Visual Basic Scripting Edition typically will not port directly to ASP.NET. In
most cases, though, the necessary changes will involve only a few lines of code.
Accessing databases from ASP.NET Applications is an often-used technique for
displaying data to Web site visitors. ASP.NET makes it easier than ever to access
databases for this purpose it also allows you to manage the database from your code.
ASP.NET provides a simple model that enables Web developers to write logic
that runs at the application level. Developers can write this code in the Global .asax text
file or in a compiled class deployed as an assembly. This logic can include application-
level events, but developers can easily extend this model to suit the needs of their Web
application.
ASP.NET takes advantage of performance enhancements found in the .NET
Frame work and common language run time. Additionally, it has been designed to offer
significant performance improvements over ASP and other Web development
platforms. All ASP.NET code is compiled ,rather than interpreted, which allows early
binding, strong typing, and just-in-time (JIT) compilation to native code, to name only a
few of its benefits. ASP.NET is also easily factorable, meaning that developers can
remove modules (a session model, for instant) that are not relevant to the application
they are developing.
ASP.NET offers the Trace context class, which allows you to write custom debug
statements to your pages as you develop them. They appear only when you have
enabled tracing for a page or entire application. Enabling tracing also appends details
about a request to the page, or, if you so specify, to a custom trace viewer that is stored
in the root directory of your application.
The .NET Framework and ASP.NET provide default authorization and
authentication schemes for Web applications. You can easily remove, add to, or replace
these schemes, depending upon the needs of your application.
ASP.NET configuration settings are stored in XML-based files, which are human
readable and writable. Each of your applications can have a distinct configuration file
and you can extend the configuration scheme to suit your requirements.
Applications are said to be running side by side when they are installed on the
same computer but use different versions of the .NET Framework. IS 6.0 uses a new
process model called worker process isolation mode, which is different from the process
model used in previous versions of IIS. ASP.NET uses this process model default when
running on windows server 2003.

ADO.NET:
ADO.NET provides consistent access to data sources such as Microsoft SQL
server, as well as data sources exposed through OLE DB and XML. Data-sharing
consumer applications can use ADO.NET to connect to these data source and retrieve,
manipulate update data.
ADO.NET cleanly factors data access from data manipulation into discrete
components that can be used separately or in tandem. ADO.NET includes .NET
Framework data providers for connecting to a database, executing commands and
retrieving results. Those results are either processed directly, or placed in an ADO.NET
Data Set object in order to be exposed to the used in an ad-hoc manner, combined with
data from multiple sources, or remote between tiers.
The ADO.NET classes are found in System. Data.dll, and are integrated with the
XML classes found in System.Xml.dll. When compiling code that uses the system. Data
namespace, reference both System.Data.dll and System.Xml.dll.
Data processing has traditionally relied primarily on a connection-based, two-tier
model. As data processing increasingly uses multi-tier architecture, programmers are
switching to a disconnected approach to provide better scalability for their application.
15
Microsoft SQL 2008
Microsoft SQL is very fast reliable and flexible Database Management System. It
provides a very high performance and it is multi threaded and multi Voter Relational
Database Management System.
Microsoft SQL is one of the most popular Relational Database Management
System on the web. The Microsoft SQL Database has become the world's most popular
open source Database, because it is free and available on almost all the platforms. The
Microsoft SQL can run on UNIX, Window, and Mac OS. Microsoft SQL is used for the
internet applications as it provides good speed and is very secure. Microsoft SQL was
developed to manage large volumes of data at very high speed to overcome the
problems of existing solutions. Microsoft SQL a be used for verity of applications but it is
mostly used for the web applications on the internet.

Microsoft SQL Features:


 Microsoft SQL is very fast and much reliable for any type of application.
 Microsoft SQL is very Lightweight application.
 Microsoft SQL command line tool is very powerful and can be used to run SQL queries
against database.
 Microsoft SQL supports indexing and binary objects.
 It is allow changes to structure of table while server is running.
 Microsoft SQL has a wide Voter base.
 It is a very fast thread-based memory allocation system.
 Microsoft SQL Written in C and C++ language.
 Microsoft SQL code is tested with different compilers.
 Microsoft SQL is available as a separate program for use in a client/server network
environment.

CHAPTER 5
SYSTEM IMPLEMENTATION AND TESTING

5.1 SYSTEM MAINTAINECE

Software implementation JAVA is a new computing platform that simplifies application


development in the highly distributed environment of the Internet. Computing relies on sharing
of resources to achieve coherence and economies of scale, similar to a utility over a network.

This section describes the five software implementation process as:

1. The implementation processes contains software preparation and transition activities, such as
the conception and creation of the implementation plan, the preparation for handling problems
identified during development, and the follow-up medical records management,

2. The problem and modification analysis process, which is executed once the applications has
become the responsibility of the implementation group.

3. The process considering the implementation of the modification itself.

4. The process acceptance of the modification, by confirming the modified work with the
individual who submitted the request in order to make sure the modification provided a solution.

5. Finally, the last implementation process, also an event which does not occur on daily basis, is
the retirement of a piece of software.

CONCLUSION

The modern Agriculture Management System for monitoring and managing of farm and
farmers has been developed which address major problems related to agriculture. The system
equips the farmer with knowledge related to farming and sales of the yield. The government
can also use the system to keep the farmers up to date with the current farming techniques.
Screenshots

Index Page

Farmer Registration
Login

Home Of Farmers
Land Details
Query
Admin Login
Admin home

Farmers Details
Lands

List of Queries
Give Suggestion
View Suggestions

Source Coding

Default.aspx
<%@ Page Title="Home Page" Language="C#" AutoEventWireup="true"
CodeFile="Default.aspx.cs" Inherits="_Default" %>
<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom active"><a
href="Default.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Farmer.aspx" class="scroll">Farmer</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Admin.aspx" class="scroll">Admin</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1><a href="">Agriculture</a></h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Welcome</h2>
<div id="top" class="callbacks_container">
<ul class="rslides" id="slider3">
<li>
<h3>Modern Agriculture</h3>
<p>Client enrollment after login inquiry
distinctive field, different message subtle elements diverse picture file upload sending
for various city officers sending. officer enlistment after login in a city in light of
question see so extraordinary client details timing sending so client requirement for
details time-saving. Officer distinctive city utilized numerous zone sending details.</p>
<a href="#" class="more btn-1b scroll" data-
toggle="" data-target=""> Read More</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</body>
</html>
Former Login
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Farmer.aspx.cs" Inherits="Farmer"
%>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="Default.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="Farmer.aspx" class="scroll">Farmer</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Admin.aspx" class="scroll">Admin</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1><a href="">Agriculture</a></h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Farmers Login</h2>
<div id="top" class="callbacks_container">
<ul class="rslides" id="slider3">
<li>
<h3>
<asp:TextBox ID="TextBox1" runat="server" placeholder="Farmers ID"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox></h3>
<h3>
<asp:TextBox ID="TextBox2" runat="server"
placeholder="Password" Height="30" Width="200" Font-Size="Medium"
ForeColor="Black" TextMode="Password"></asp:TextBox></h3>
<h3>
<asp:Button ID="Button1" runat="server" Text="LOGIN" BackColor="White"
BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button1_Click" /></h3>
<a href="NewFarmer.aspx" class="more btn-1b
scroll" data-toggle="" data-target="">JOIN AS A FORMER</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.SqlClient;

public partial class Farmer : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("select * from farmers where Fid='" +
TextBox1.Text + "' and Password='" + TextBox2.Text + "'", con);
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataTable dt = new DataTable();
da.Fill(dt);
if (dt.Rows.Count > 0)
{
Session["fn"] = TextBox1.Text;
Response.Redirect("FHome.aspx");
Response.Write("<script>alert('Wrong ID or Password');window.location=
'Farmer.aspx';</script>");
}
else
{
Response.Write("<script>alert('Wrong ID or Password');window.location =
'Farmer.aspx';</script>");
}
con.Close();
}
}

Register
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NewFarmer.aspx.cs"
Inherits="NewFarmer" %>
<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form id="Form1" name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="Default.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="Farmer.aspx" class="scroll">Farmer</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Admin.aspx" class="scroll">Admin</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1><a href="">Agriculture</a></h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Farmers Registration</h2>
<div id="top" class="callbacks_container">

<ul class="rslides" id="slider3">


<li>
<h3>
<asp:TextBox ID="TextBox1" runat="server" placeholder="Name"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"
placeholder="Date of Birth"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"
TextMode="Date"></asp:TextBox>

</h3>
<h3>
<asp:TextBox ID="TextBox3" runat="server" placeholder="Mobile"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server"
placeholder="Address"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
</h3>
<h3>
<asp:TextBox ID="TextBox5" runat="server" placeholder="Area"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
<asp:TextBox ID="TextBox6" runat="server"
placeholder="City"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
</h3>
<h3>
<asp:TextBox ID="TextBox7" runat="server" placeholder="Farmer ID"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
<asp:TextBox ID="TextBox8" runat="server"
placeholder="Password"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black" TextMode="Password"></asp:TextBox>
</h3>
<h3>
<asp:Button ID="Button1" runat="server" Text="Submit" BackColor="White"
BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button1_Click" /></h3>

</li>
</ul>

</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data.SqlClient;
using System.Data;

public partial class NewFarmer : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into farmers values('" + TextBox1.Text +
"','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" +
TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text +
"')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Write("<script>alert('Registered...');window.location =
'Farmer.aspx';</script>");
}
}

FHome
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FHome.aspx.cs" Inherits="FHome"
%>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom active"><a
href="FHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="LandDetails.aspx" class="scroll">Land Details</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Queries.aspx" class="scroll">Queries</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
Welcome

<asp:Label ID="Label1" runat="server" Text="Label"


ForeColor="White"></asp:Label></h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Welcome</h2>
<div id="top" class="callbacks_container">
<ul class="rslides" id="slider3">
<li>
<h3>Modern Agriculture</h3>
<p>Client enrollment after login inquiry
distinctive field, different message subtle elements diverse picture file upload sending
for various city officers sending. officer enlistment after login in a city in light of
question see so extraordinary client details timing sending so client requirement for
details time-saving. Officer distinctive city utilized numerous zone sending details.</p>
<a href="#" class="more btn-1b scroll" data-
toggle="" data-target=""> Read More</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</body>
</html>

Lands
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Lands.aspx.cs" Inherits="Lands"
%>
<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form id="Form1" name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="AHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="FarmerDetails.aspx" class="scroll">Farmers</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="Lands.aspx" class="scroll">Lands</a></li>
<li class="hvr-bounce-to-bottom"><a href="suggestions.aspx"
class="scroll">Suggestion</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
</h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">

<div id="top" class="callbacks_container">


<ul class="rslides" id="slider3">
<li>
<h3>Lands Details</h3>

<asp:GridView ID="GridView1" runat="server" ForeColor="White"


Height="147px"
Width="778px">
</asp:GridView>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class Lands : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
refreshdata();
}
}
public void refreshdata()
{

SqlCommand cmd = new SqlCommand("select * from lands", con);


SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();
}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LandDetails.aspx.cs"


Inherits="LandDetails" %>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="FHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="LandDetails.aspx" class="scroll">Land Details</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Queries.aspx" class="scroll">Queries</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
Welcome

<asp:Label ID="Label1" runat="server" Text="Label"


ForeColor="White"></asp:Label></h1>
<p>
<asp:Label ID="id" runat="server" Text="Label"
Visible="False"></asp:Label>
<asp:Label ID="fid" runat="server" Text="Label"
Visible="False"></asp:Label>
</p>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Agriculture Lands</h2>
<div id="top" class="callbacks_container">

<ul class="rslides" id="slider3">


<li>
<h3>
<asp:TextBox ID="TextBox1" runat="server"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"
ReadOnly="True"></asp:TextBox>
<asp:TextBox ID="TextBox2" runat="server"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"
ReadOnly="True"></asp:TextBox>

</h3>
<h3>
<asp:TextBox ID="TextBox3" runat="server" placeholder="Land in Sq.Ft"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
<asp:TextBox ID="TextBox4" runat="server"
placeholder="Soil"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox>
</h3>

<h3>
<asp:Button ID="Button1" runat="server" Text="Submit" BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button1_Click" /></h3>

<h3>
<asp:GridView ID="GridView1" runat="server"
ForeColor="White"
Height="140px" Width="506px"
onselectedindexchanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:ButtonField Text="Select" CommandName="Select" ItemStyle-Width="150"
ButtonType="Button" >
<ControlStyle BackColor="#4E7405" ForeColor="White" />
<ItemStyle Width="150px"></ItemStyle>
</asp:ButtonField>
</Columns>
</asp:GridView>
<h3>
<asp:Button ID="Button3" runat="server" Text="Delete" BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button3_Click" Visible="False" />
&nbsp;<asp:Button ID="Button2" runat="server" Text="Update"
BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button2_Click" Visible="False" /></h3>

<h3>
</h3>
<h3>
<asp:TextBox ID="TextBox5" runat="server" placeholder="Land in Sq.Ft"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black" Visible="False"></asp:TextBox>
&nbsp;<asp:TextBox ID="TextBox6" runat="server"
placeholder="Soil"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black" Visible="False"></asp:TextBox>
</h3>
<h3>
<asp:Button ID="Button4" runat="server" Text="Submit" BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button4_Click" Visible="False" /></h3>
</li>
</ul>
<a name="bottom"></a>
</div>
</div>

</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class LandDetails : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Session["fn"].ToString();
con.Open();
SqlCommand cmd = new SqlCommand("select * from farmers where Fid='" + Label1.Text
+ "'", con);
SqlDataReader dr = cmd.ExecuteReader();
if (dr.Read())
{
TextBox1.Text = dr["Fid"].ToString();
TextBox2.Text = dr["Name"].ToString();
}
con.Close();
if (!Page.IsPostBack)
{
refreshdata();
}
int r;
con.Open();
SqlCommand cmd1 = new SqlCommand("Select max(Lid) from lands", con);
SqlDataReader dr1 = cmd1.ExecuteReader();

if (dr1.Read())
{

string d = dr1[0].ToString();
if (d == "")
{

id.Text = "1";

}
else
{
r = Convert.ToInt32(dr1[0].ToString());
r = r + 1;
id.Text = r.ToString();
}
}
con.Close();
}
public void refreshdata()
{

SqlCommand cmd = new SqlCommand("select * from lands where


Fid='"+Label1.Text+"'", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();

}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into lands values('"+id.Text+"','" +
TextBox1.Text + "','" + TextBox2.Text + "','" + TextBox3.Text + "','" + TextBox4.Text +
"')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("LandDetails.aspx");
}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
fid.Text = GridView1.SelectedRow.Cells[1].Text;
Button2.Visible = true;
Button3.Visible = true;
ClientScript.RegisterStartupScript(this.GetType(), "Anchor", "location.hash =
'#bottom';", true);
}
protected void Button3_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("delete from lands where Lid='" + fid.Text + "'",
con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("LandDetails.aspx");
}
protected void Button2_Click(object sender, EventArgs e)
{
TextBox5.Visible = true;
TextBox6.Visible = true;
Button4.Visible = true;
ClientScript.RegisterStartupScript(this.GetType(), "Anchor", "location.hash =
'#bottom';", true);
}
protected void Button4_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("update lands set Landsqft='" + TextBox5.Text +
"', Soil='" + TextBox6.Text + "' where Lid='"+fid.Text+"'", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("LandDetails.aspx");
}
}
Queries
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Queries.aspx.cs"
Inherits="Queries" %>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form id="Form1" name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="FHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="LandDetails.aspx" class="scroll">Land Details</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="Queries.aspx" class="scroll">Queries</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
Welcome

<asp:Label ID="Label1" runat="server" Text="Label"


ForeColor="White"></asp:Label></h1>
<p>
<asp:Label ID="id" runat="server" Text="Label"
Visible="False"></asp:Label>
</p>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Agriculture Lands</h2>
<div id="top" class="callbacks_container">

<ul class="rslides" id="slider3">


<li>
<h3>
<asp:TextBox ID="TextBox1" runat="server"
Height="108px" Width="280px" Font-Size="Medium"
ForeColor="Black"
TextMode="MultiLine"></asp:TextBox>

</h3>

<h3>
<asp:Button ID="Button1" runat="server" Text="Submit" BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button1_Click" /></h3>

<h3>
<asp:GridView ID="GridView1" runat="server"
ForeColor="White"
Height="140px" Width="506px">

</asp:GridView>
</h3>
<h3>
<asp:GridView ID="GridView2" runat="server"
ForeColor="White"
Height="140px" Width="506px">

</asp:GridView>
</h3>
</li>
</ul>
<a name="bottom"></a>
</div>
</div>

</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class Queries : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{
Label1.Text = Session["fn"].ToString();
int r;
con.Open();
SqlCommand cmd1 = new SqlCommand("Select max(id) from queries", con);
SqlDataReader dr1 = cmd1.ExecuteReader();

if (dr1.Read())
{

string d = dr1[0].ToString();
if (d == "")
{

id.Text = "1";

}
else
{
r = Convert.ToInt32(dr1[0].ToString());
r = r + 1;
id.Text = r.ToString();
}
}
con.Close();
if (!Page.IsPostBack)
{
refreshdata();
}
if (!Page.IsPostBack)
{
refreshdatas();
}
}
public void refreshdata()
{
SqlCommand cmd = new SqlCommand("select * from queries where Fid='" + Label1.Text
+ "'", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();

}
public void refreshdatas()
{

SqlCommand cmd = new SqlCommand("select * from suggestions where Fid='" +


Label1.Text + "'", con);
SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView2.DataSource = ds;
GridView2.DataBind();

protected void Button1_Click(object sender, EventArgs e)


{
con.Open();
SqlCommand cmd = new SqlCommand("insert into queries values('" + id.Text + "','"
+ Label1.Text + "','" + TextBox1.Text + "')", con);
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("Queries.aspx");
}
}

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="suggestions.aspx.cs"


Inherits="suggestions" %>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form id="Form1" name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="AHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="FarmerDetails.aspx" class="scroll">Farmers</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Lands.aspx" class="scroll">Lands</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="suggestions.aspx" class="scroll">Suggestion</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
</h1>
</div>
<div class="clearfix">
<asp:Label ID="Label1" runat="server" Text="Label"
Visible="False"></asp:Label>
<asp:Label ID="Label2" runat="server" Text="Label"
Visible="False"></asp:Label>
<asp:Label ID="Label3" runat="server" Text="Label"
Visible="False"></asp:Label>
</div>
</div>
</div>
<div class="banner-text">

<div id="top" class="callbacks_container">


<ul class="rslides" id="slider3">
<li>
<h3>Queries From Farmers</h3>

<asp:GridView ID="GridView1" runat="server" ForeColor="White"


Height="147px"
Width="802px"
onselectedindexchanged="GridView1_SelectedIndexChanged">
<Columns>
<asp:ButtonField Text="Give Suggestion" CommandName="Select" ItemStyle-
Width="150"
ButtonType="Button" >
<ControlStyle BackColor="#4E7405" ForeColor="White" />
<ItemStyle Width="150px"></ItemStyle>
</asp:ButtonField>
</Columns>
</asp:GridView>
<h3>

<asp:TextBox ID="TextBox1" runat="server" Height="107px"


TextMode="MultiLine"
Width="353px" Visible="False" Font-Size="Medium"
ForeColor="#009900"></asp:TextBox>
</h3>

<h3>
<asp:Button ID="Button1" runat="server" Text="Submit" BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button1_Click" Visible="False" /></h3>
<asp:GridView ID="GridView2" runat="server"
ForeColor="White" Height="147px"
Width="802px">

</asp:GridView>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;
public partial class suggestions : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
refreshdata();
}
if (!Page.IsPostBack)
{
refreshdatas();
}
}
public void refreshdata()
{

SqlCommand cmd = new SqlCommand("select * from queries", con);


SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();

}
public void refreshdatas()
{

SqlCommand cmd = new SqlCommand("select * from suggestions", con);


SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView2.DataSource = ds;
GridView2.DataBind();

}
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = GridView1.SelectedRow.Cells[1].Text;
Label2.Text = GridView1.SelectedRow.Cells[2].Text;
Label3.Text = GridView1.SelectedRow.Cells[3].Text;
Button1.Visible = true;
TextBox1.Visible = true;
}
protected void Button1_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("insert into suggestions values('" + Label1.Text
+ "','" + Label2.Text + "','" + Label3.Text + "','" + TextBox1.Text + "')", con);
cmd.ExecuteNonQuery();

con.Close();
Response.Redirect("suggestions.aspx");
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin.aspx.cs" Inherits="Admin"
%>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form id="Form1" name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="Default.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Farmer.aspx" class="scroll">Farmer</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="Admin.aspx" class="scroll">Admin</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1><a href="">Agriculture</a></h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Admin Login</h2>
<div id="top" class="callbacks_container">
<ul class="rslides" id="slider3">
<li>
<h3>
<asp:TextBox ID="TextBox1" runat="server" placeholder="Admin ID"
Height="30" Width="200" Font-Size="Medium"
ForeColor="Black"></asp:TextBox></h3>
<h3>
<asp:TextBox ID="TextBox2" runat="server"
placeholder="Password" Height="30" Width="200" Font-Size="Medium"
ForeColor="Black" TextMode="Password"></asp:TextBox></h3>
<h3>
<asp:Button ID="Button1" runat="server" Text="LOGIN" BackColor="White"
BorderStyle="None"
Font-Size="Medium" ForeColor="#009900" Height="30px"
Width="200px"
onclick="Button1_Click" /></h3>
&nbsp;</li>

</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Admin : System.Web.UI.Page


{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
if (TextBox1.Text == "admin" && TextBox2.Text == "admin")
{
Response.Redirect("AHome.aspx");
}
else
{
Response.Write("<script>alert('Invalid Login');window.location=
'Admin.aspx';</script>");
}
}
}

AHome
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AHome.aspx.cs" Inherits="AHome"
%>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom active"><a
href="AHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom"><a
href="FarmerDetails.aspx" class="scroll">Farmers</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Lands.aspx" class="scroll">Lands</a></li>
<li class="hvr-bounce-to-bottom"><a href="suggestions.aspx"
class="scroll">Suggestion</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
</h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">
<h2>Welcome Admin</h2>
<div id="top" class="callbacks_container">
<ul class="rslides" id="slider3">
<li>
<h3>Modern Agriculture</h3>
<p>Client enrollment after login inquiry
distinctive field, different message subtle elements diverse picture file upload sending
for various city officers sending. officer enlistment after login in a city in light of
question see so extraordinary client details timing sending so client requirement for
details time-saving. Officer distinctive city utilized numerous zone sending details.</p>
<a href="#" class="more btn-1b scroll" data-
toggle="" data-target=""> Read More</a>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</body>
</html>

FormersDetails
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="FarmerDetails.aspx.cs"
Inherits="FarmerDetails" %>

<html>
<head>
<title>ModernAgri</title>
<link href="css/bootstrap.css" type="text/css" rel="stylesheet" media="all">
<link href="css/style.css" type="text/css" rel="stylesheet" media="all">
<link rel="stylesheet" href="css/swipebox.css">
<script src="js/jquery-1.11.1.min.js"></script>
</head>
<body>
<body><link rel="stylesheet" href="../../../../../images/demobar_w3_16oct2019.css">
<form name="form1" runat="server">
<div class="top-nav">
<nav class="navbar navbar-default">
<div class="container">
<button type="button" class="navbar-toggle collapsed" data-
toggle="collapse" data-target="#bs-example-navbar-collapse-1">Menu

</button>
<div class="collapse navbar-collapse" id="bs-example-navbar-
collapse-1">
<ul class="nav navbar-nav">
<li class="hvr-bounce-to-bottom"><a
href="AHome.aspx">Home</a></li>
<li class="hvr-bounce-to-bottom active"><a
href="FarmerDetails.aspx" class="scroll">Farmers</a></li>
<li class="hvr-bounce-to-bottom"><a
href="Lands.aspx" class="scroll">Lands</a></li>
<li class="hvr-bounce-to-bottom"><a href="suggestions.aspx"
class="scroll">Suggestion</a></li>
<li class="hvr-bounce-to-bottom"><a href="Default.aspx"
class="scroll">Logout</a></li>
</ul>
<div class="clearfix"> </div>
</div>
</div>
</nav>
</div>
<div class="banner">
<div class="header">
<div class="container">
<div class="header-left">
<h1>
</h1>
</div>
<div class="clearfix"> </div>
</div>
</div>
<div class="banner-text">

<div id="top" class="callbacks_container">


<ul class="rslides" id="slider3">
<li>
<h3>Farmers Details</h3>

<asp:GridView ID="GridView1" runat="server" ForeColor="White"


Height="147px"
Width="839px">
</asp:GridView>
</li>
</ul>
</div>
</div>
</div>
<div class="footer">
<div class="container">
<p>© 2019 Agriculture . All rights reserved | Design by <a href="">
IRIS</a></p>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {

$().UItoTop({ easingType: 'easeOutQuart' });

});
</script>
<script src="js/bootstrap.js"></script>
</form>
</body>
</html>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using System.IO;

public partial class FarmerDetails : System.Web.UI.Page


{
SqlConnection con = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=D:\
DB\agri.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True");
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
refreshdata();
}
}
public void refreshdata()
{

SqlCommand cmd = new SqlCommand("select * from farmers", con);


SqlDataAdapter sda = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
sda.Fill(ds);
GridView1.DataSource = ds;
GridView1.DataBind();

}
}

You might also like