0% found this document useful (0 votes)
212 views

NGO Management System-Full Coding

This document contains code for an NGO management system website that allows users to log in, sign up, submit feedback, request a forgotten password, change their password, and provides an administrator login and dashboard. The code includes pages for login, signup, feedback submission, password retrieval/changing, and an admin interface to view and manage bookings, customers, billing, and more. Functions are included to connect to a SQL database and perform queries to authenticate users, insert and retrieve data, and direct users to different pages within the site.

Uploaded by

Babji Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
212 views

NGO Management System-Full Coding

This document contains code for an NGO management system website that allows users to log in, sign up, submit feedback, request a forgotten password, change their password, and provides an administrator login and dashboard. The code includes pages for login, signup, feedback submission, password retrieval/changing, and an admin interface to view and manage bookings, customers, billing, and more. Functions are included to connect to a SQL database and perform queries to authenticate users, insert and retrieve data, and direct users to different pages within the site.

Uploaded by

Babji Babu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

NGO Management System-full Coding

Login User.aspx
using
using
using
using
using
using
using
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;

public partial class Default2 :


System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void LinkButton2_Click(object
sender, EventArgs e)
{
Response.Redirect("Signup.aspx");
}
protected void ImageButton1_Click(object
sender, ImageClickEventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "select *from signup
where uname=" + "'" + txtuid.Text + "'" + "and
pwd=" + "'" + txtpwd.Text+"'";

SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
{
lblmsg.Text = "Login Are Not
Match";
}
else
{
Session["uname"] = txtuid;
Response.Redirect("Service.aspx");
}
con.Close();
con.Dispose();
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
protected void LinkButton1_Click(object
sender, EventArgs e)
{
Response.Redirect("FPwd.aspx");
}
}

Sign Up.aspx
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;

using
using
using
using
using
using
using

System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;

public partial class _Default :


System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
public void clear()
{
txtage.Text = " ";
txtcity.Text = " ";
txtcno.Text = " ";
txtemail.Text = " ";
txtfname.Text = " ";
txtlname.Text = " ";
txtpwd.Text = " ";
txtuname.Text = " ";
ddcnty.SelectedItem.Text = "Australia";
}
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void ImageButton1_Click(object
sender, ImageClickEventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();

string strsql="Insert into signup


values("+"'"+txtuname.Text+"'"+","+"'"+txtpwd.T
ext+"'"+","+"'"+txtfname.Text+"'"+","+"'"+txtln
ame.Text+"'"+","+Convert.ToInt32(txtage.Text)+"
,"+"'"+txtemail.Text+"'"+","+Convert.ToInt64(tx
tcno.Text)+","+"'"+txtcity.Text+"'"+","+"'"+ddc
nty.SelectedItem.Text+"'"+")";
SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
con.Dispose();
clear();
lblmsg.Text = "Data Inseted
Successfully";
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
}

Feed Back.aspx
using
using
using
using
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default :
System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
public void clear()
{
txtemail.Text = " ";
txtmsg.Text = " ";
txtname.Text = " ";
}
protected void Button2_Click(object sender,
EventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "insert into feedback
values(" + "'" + txtname.Text + "'" + "," + "'"
+ txtemail.Text + "'" + "," + "'" + txtmsg.Text
+ "'" + ")";
SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
lblmsg.Text = "Feed Back Submitted";
con.Close();
con.Dispose();
clear();

}
protected void Button1_Click(object sender,
EventArgs e)
{
clear();
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
}

Forgot Password.aspx
using
using
using
using
using
using
using
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;

public partial class _Default :


System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void ImageButton1_Click(object
sender, ImageClickEventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "select pwd from signup
where uname="+"'"+txtuname.Text+"'"+"and
age="+txtage.Text;
SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)

{
lblmsg.Text = "Fail To Access";
}
else
{
lblmsg.Text =
ds.Tables[0].ToString();
}
con.Close();
con.Dispose();
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
protected void LinkButton1_Click(object
sender, EventArgs e)
{
Response.Redirect("Admin.aspx");
}
}

Change Password.aspx
using
using
using
using
using
using
using
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;

public partial class _Default :


System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void Button2_Click(object sender,
EventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "select *from signup
where uname=" + "'" + txtuid.Text + "'" + "and
pwd=" + "'" + txtpwd.Text + "'";
SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)

{
lblmsg.Text = "No Data R Match";
}
else
{
Panel2.Visible = true;
Panel1.Visible = false;
lblmsg.Text = " ";
}
con.Close();
con.Dispose();
}
protected void ImageButton1_Click(object
sender, ImageClickEventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "update signup set
pwd="+"'"+txtnpwd.Text+"'";
SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
lblmsg.Text = "Password Change
Successfully";
Panel2.Visible = false;
con.Close();
con.Dispose();
}
}

Administrator Login
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;

using
using
using
using
using
using
using

System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;

public partial class Default2 :


System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void LinkButton2_Click(object
sender, EventArgs e)
{
Response.Redirect("Signup.aspx");
}
protected void ImageButton1_Click(object
sender, ImageClickEventArgs e)
{
if (txtuid.Text == "Admin"&&
txtpwd.Text =="Track")
{
Response.Redirect("Admin.aspx");
}
else
{
lblmsg.Text = "You Not Authorize To
Use This Service";
}
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)

{
}
}

Admin Page
using
using
using
using
using
using
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;
System.Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;

public partial class _Default :


System.Web.UI.Page
{
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void LinkButton1_Click(object
sender, EventArgs e)
{
Response.Redirect("Chkin.aspx");
}
protected void LinkButton2_Click(object
sender, EventArgs e)
{
Response.Redirect("Chkout.aspx");
}
protected void LinkButton3_Click(object
sender, EventArgs e)
{
Response.Redirect("Booking.aspx");
}
protected void LinkButton4_Click(object
sender, EventArgs e)

{
Response.Redirect("CRAva.aspx");
}
protected void LinkButton5_Click(object
sender, EventArgs e)
{
Response.Redirect("ViewAll.aspx");
}
protected void LinkButton6_Click(object
sender, EventArgs e)
{
Response.Redirect("ViewAllChkOut");
}
protected void LinkButton7_Click(object
sender, EventArgs e)
{
Response.Redirect("SBook.aspx");
}
protected void LinkButton8_Click(object
sender, EventArgs e)
{
Response.Redirect("SCust.aspx");
}
protected void LinkButton9_Click(object
sender, EventArgs e)
{
Response.Redirect("Bill.aspx");
}
protected void LinkButton10_Click(object
sender, EventArgs e)
{
Response.Redirect("VCFB.aspx");
}
protected void LinkButton11_Click(object
sender, EventArgs e)
{
Response.Redirect("Services.aspx");
}

protected void LinkButton12_Click(object


sender, EventArgs e)
{
Response.Redirect("Detail.aspx");
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
}

DETAILS.aspx
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
public partial class _Default :
System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void
DropDownList2_SelectedIndexChanged(object
sender, EventArgs e)
{
}
protected void Button2_Click(object sender,
EventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "select *from chkin
where roomno="+txtroomno.Text;

SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
{
lblmsg.Text = "Room Available";
btnsybmit.Visible = true;
}
else
{
lblmsg.Text = "Room Not Available
Choose Another";
btnsybmit.Visible = false;
}
con.Close();
con.Dispose();
}
protected void btnsybmit_Click(object
sender, EventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql ="Insert into chkin
values("+Convert.ToInt32(txtcid.Text)+","+"'"+t
xtcname.Text+"'"+","+"'"+txtaddr.Text+"'"+","+"
'"+ddsex.SelectedItem.Text+"'"+","+Convert.ToIn
t16(txtage.Text)+","+"'"+txtemail.Text+"'"+","+
Convert.ToInt64(txtcontact.Text)+","+"'"+txtchk
indate.Text+"'"+","+"'"+","+Convert.ToInt32(txt
floorno.Text)+","+Convert.ToInt32(txtroomno.Tex
t)+","+"'"+ddroomtype.SelectedItem.Text+"'"+")"
;

SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
con.Close();
con.Dispose();
lblmsg.Text = "Data Inserted
Successfully";
}
protected void Button3_Click(object sender,
EventArgs e)
{
Response.Redirect("Payment.aspx");
}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
protected void LinkButton1_Click(object
sender, EventArgs e)
{
Response.Redirect("Admin.aspx");
}
}

VIEW PAGE.aspx
using
using
using
using

System;
System.Data;
System.Configuration;
System.Collections;

Web;
System.Web.Security;
System.Web.UI;
System.Web.UI.WebControls;
System.Web.UI.WebControls.WebParts;
System.Web.UI.HtmlControls;
System.Data.SqlClient;

using System.

using
using
using
using
using
using

public partial class _Default :


System.Web.UI.Page
{
public SqlConnection con;
public SqlCommand com;
protected void Page_Load(object sender,
EventArgs e)
{
}
protected void Button2_Click(object sender,
EventArgs e)
{
con = new
SqlConnection("Server=localhost\\sqlexpress;dat
abase=hotel;" + "Integrated Security=True");
con.Open();
string strsql = "select *from chkin
where cid=" + txtcid.Text;
SqlDataAdapter da = new
SqlDataAdapter(strsql, con);
DataSet ds = new DataSet();
da.Fill(ds);
if (ds.Tables[0].Rows.Count == 0)
{
lblmsg.Text = "Sorry Customer Not
Found";
DetailsView1.Visible = false;
}
else
{
DetailsView1.DataSource = ds;
DetailsView1.DataBind();
DetailsView1.Visible = true;
lblmsg.Text = " ";
}
con.Close();
con.Dispose();

}
protected void Menu1_MenuItemClick(object
sender, MenuEventArgs e)
{
}
protected void LinkButton1_Click(object
sender, EventArgs e)
{
Response.Redirect("Admin.aspx");
}
}

You might also like