ADDIND RECORD
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class add_record : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection CON = new SqlConnection("Data Source=LATA-
LAPTOP\\SQLEXPRESS;Initial Catalog=satnam sakshi;Integrated
Security=True;Multipleactiveresultsets=true");
[Link]();
SqlCommand CMD = new SqlCommand("INSERT INTO ssa1
VALUES(@val,@va,@val1,@val2,@val3,@val4,@val5,@val6,@val7,@val8)", CON);
[Link]("@val", [Link]());
[Link]("@va", [Link]);
[Link]("@val1", [Link]);
[Link]("@val2", [Link]);
[Link]("@val3", [Link]);
[Link]("@val4", [Link]);
[Link]("@val5", [Link]);
[Link]("@val6",[Link]);
[Link]("@val7", [Link]);
[Link]("@val8", [Link]);
[Link]();
[Link] = false;
[Link] = false;
[Link] = false;
[Link] = false;
[Link] = false;
[Link] = false;
[Link] = false;
[Link] = false;
//[Link] = false;
//[Link] = false;
SqlCommand CMD1 = new SqlCommand("INSERT INTO ssl2
VALUES(@val1,@val2,@val3,@val4)", CON);
[Link]("@val1", [Link]);
[Link]("@val2", [Link]);
[Link]("@val3", "student");
[Link]("@val4", [Link]);
[Link]();
[Link] = "Admission Details Recorded";
}
protected void TextBox8_TextChanged(object sender, EventArgs e)
{
}
}
ADMIN PAGE
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class admin_hm_page : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
}
// protected void Button1_Click(object sender, EventArgs e)
//{
// byte[] file;
//file = [Link];
//[Link]("c:\\java\\"+[Link], file);
//}
}
LOGIN PAGE
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class Default3 : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection CON2 = new SqlConnection("Data Source=LATA-
LAPTOP\\SQLEXPRESS;Initial Catalog=satnam sakshi;Integrated
Security=True;Multipleactiveresultsets=true");
[Link]();
SqlDataAdapter da = new SqlDataAdapter("select * from
ssl2",CON2);
DataSet ds = new DataSet();
[Link](ds);
foreach (DataRow dr in [Link][0].Rows)
{
if ([Link] == dr[0].ToString() && [Link]==
dr[1].ToString())
{
if (dr[2].ToString().Equals("student"))
{
Session["StudentName"] = dr[0].ToString();
[Link]("~/student home [Link]");
break;
}
if (dr[2].ToString().Equals("warden"))
{
//Loading_Page load = new Loading_Page();
[Link]("~/warden hm [Link]");
break;
}
if (dr[2].ToString().Equals("admin"))
{
//Loading_Page load = new Loading_Page();
[Link]("~/admin hm [Link]");
break;
}
}
else
[Link] = "Login Failed";
}
}
protected void TextBox4_TextChanged(object sender, EventArgs e)
{
}
protected void TextBox1_TextChanged(object sender, EventArgs e)
{
}
}
RETRIEVE PASSWORD
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class RP : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
SqlConnection CON = new SqlConnection("Data Source=LATA-
LAPTOP\\SQLEXPRESS;Initial Catalog=satnam sakshi;Integrated
Security=True;Multipleactiveresultsets=true");
[Link]();
SqlCommand CMD = new SqlCommand("Select password from ssl2 where
[user name]=@val1 ", CON);
[Link]("@val1", [Link]);
SqlDataReader dr = [Link]();
[Link]();
[Link]="PASSWORD IS :" + dr[0];
}
}
STUDENT HP
using System;
using [Link];
using [Link];
using [Link];
using [Link];
using [Link];
public partial class student_home_page : [Link]
{
protected void Page_Load(object sender, EventArgs e)
{
[Link] = "Welcome : "+Session["StudentName"].ToString();
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Calendar1_SelectionChanged(object sender, EventArgs
e)
{
}
}