protected void submit_Click(object sender, EventArgs e) { con.connect(); Session["ID"] = uname.Text; string str = con.login(uname.Text, password.Text); if (password.Text == str) { string str1 = con.logrole(uname.Text); if (str1 == "Student") { Response.Redirect("student.aspx"); } else if (str1 == "Staff") { Response.Redirect("staff.aspx"); } else if (str1 == "Accountant") { Response.Redirect("accountant.aspx"); } else if (str1 == "Admin") { Response.Redirect("admin.aspx"); } } }
//protected void btnupdate_Click(object sender, EventArgs e) //{ // cn.connect(); // string str = cn.upfee(txtamtp.Text, txtsfd.Text); // if (str == "1") // { // MessageBox.Show("Amount Updated"); // } // else // { // MessageBox.Show("Amount Not Updated"); // } protected void btnupdate_Click(object sender, EventArgs e) { cn.connect(); int p = int.Parse(txtamtp.Text); string fee; int a, b, c; a = int.Parse(txtamtp0.Text); b = int.Parse(txttamt.Text); int k = a + p; fee = k.ToString(); if (k <= b) { //MessageBox.Show(""); string str = cn.upfee(fee, txtsfd.Text); if (str == "1") { MessageBox.Show("Amount Updated"); } else { MessageBox.Show("Amount Not Updated"); } } //c = b - a; //fee = c.ToString(); }
protected void btnok_Click(object sender, EventArgs e) { cn.connect(); string str = cn.cftisus(ddldpt.SelectedItem.Text, txtidno.Text, ddlmoc.SelectedItem.Text, txtmultiline.Text, txtamount.Text); if (str == "1") { MessageBox.Show("CERTIFICATE ISSUED"); } else { MessageBox.Show("NOT ISSUED"); } }
protected void btnpost_Click(object sender, EventArgs e) { cn.connect(); string NOTIFICATION; ////NOTIFICATION = txtntf; string str = cn.NOTIFICATION(txtntf.Text); if (str == "1") { MessageBox.Show("successfully posted"); } else { MessageBox.Show("NOT posted"); } }
protected void Page_Load(object sender, EventArgs e) { con.connect(); dt5 = con.staffdetails(Session["[ID NUMBER]"].ToString()); LBLADD.Text = dt5.Rows[0][11].ToString(); LBLDEPT.Text = dt5.Rows[0][5].ToString(); LBLDOB.Text = dt5.Rows[0][4].ToString(); LBLFNAME.Text = dt5.Rows[0][3].ToString(); LBLID.Text = dt5.Rows[0][1].ToString(); LBLMAIL.Text = dt5.Rows[0][9].ToString(); LBLPANNO.Text = dt5.Rows[0][8].ToString(); LBLDESGNTN.Text = dt5.Rows[0][15].ToString(); LBLNAME.Text = dt5.Rows[0][2].ToString(); LBLNMAE.Text = dt5.Rows[0][2].ToString(); LBLPHNO.Text = dt5.Rows[0][7].ToString(); }
protected void Page_Load(object sender, EventArgs e) { con.connect(); dt = con.stdetails(Session["[ID NUMBER]"].ToString()); LBLADD.Text = dt.Rows[0][12].ToString(); LBLDEPT.Text = dt.Rows[0][2].ToString(); LBLDOB.Text = dt.Rows[0][9].ToString(); LBLFNAME.Text = dt.Rows[0][5].ToString(); LBLID.Text = dt.Rows[0][1].ToString(); LBLMAIL.Text = dt.Rows[0][19].ToString(); LBLMNAME.Text = dt.Rows[0][7].ToString(); LBLMOD.Text = dt.Rows[0][16].ToString(); LBLNAME.Text = dt.Rows[0][3].ToString(); LBLNMAE.Text = dt.Rows[0][3].ToString(); LBLPHNO.Text = dt.Rows[0][4].ToString(); }
protected void btnsin_Click(object sender, EventArgs e) { con.connect(); Session["[ID NUMBER]"] = txtidno.Text; string str = con.stlog(txtidno.Text, txtpwd.Text); if (txtpwd.Text == str) { Response.Redirect("StudentHome.aspx"); } else { string str1 = con.stafflog(txtidno.Text, txtpwd.Text); if (txtpwd.Text == str1) { string dept = "select DEPARTMENT from STAFFREGISTRATION where [ID NUMBER]='" + txtidno.Text + "'"; SqlCommand CMD = new SqlCommand(dept, con1); con1.Open(); //string str2 = CMD.ExecuteNonQuery().ToString(); string str2 = CMD.ExecuteScalar().ToString(); //string str2 = CMD.ExecuteScalar().ToString(); if (str2 == "ACCOUNTS") { Response.Redirect("ACCOUNTSHOME.aspx"); } else if (str2 == "CSE" || str2 == "IT" || str2 == "ECE") { Response.Redirect("STAFFHOME.aspx"); } } else if (txtidno.Text == "BITSW") { if (txtpwd.Text == "BITSWADMIN") { Response.Redirect("HOME.aspx"); } } } }
protected void Page_Load(object sender, EventArgs e) { con.connect(); dt = con.stdetails(Session["[ID NUMBER]"].ToString()); txtid.Text = dt.Rows[0][1].ToString(); }
protected void btnsubmit_Click(object sender, EventArgs e) { cn.connect(); DateTime dt; dt = DateTime.Now; txtdt.Text = dt.ToString("dd/MM/yyyy"); if (txtid.Text == "") { MessageBox.Show("Select Department And Click On Generate Id button to generate the Student ID"); } if (txtname.Text == "") { MessageBox.Show("Enter Candidate Name"); } if (txtfname.Text == "") { MessageBox.Show("Enter Father's Name"); } if (txtfphno.Text == "") { MessageBox.Show("Enter Father's Phone Number"); } if (txtmname.Text == "") { MessageBox.Show("Enter Mother's Name"); } if (txtmphno.Text == "") { MessageBox.Show("Enter Mother's Phone Number"); } if (txtdb.Text == "") { MessageBox.Show("Enter Valid DOB"); } if (txttmpadd.Text == "") { MessageBox.Show("Enter Temporary Address"); } if (txtperadd.Text == "") { MessageBox.Show("Enter Permanent Address"); } if (ddlmoa.SelectedItem.Text == "--select--") { MessageBox.Show("Select Mode Of Admission"); } if (txteamra.Text == "") { MessageBox.Show("Enter Eamcet Rank"); } if (txtmailid.Text == "") { MessageBox.Show("Enter Valid MailID"); } if (txtpwd.Text == "") { MessageBox.Show("Enter Password"); } if (txtrepwd.Text == "") { MessageBox.Show("Re-Enter Password"); } else { //string str = con1.StReg(txtid.Text, ddldept.SelectedItem.Text, txtfname.Text, txtlname.Text, txtfname.Text, txtdob.Text, txtperdet.Text, txtperdet.Text, txtmail.Text, txtnationality.Text, txtrno.Text, txtmobile.Text, txttenname.Text, txttenspec.Text, txtyop.Text, txttenaggre.Text, txtintername.Text, txtintersec.Text, txtinteryop.Text, txtinteraggre.Text, txthtn.Text, txtrank.Text, txtjdt.Text, ddlcaste.SelectedItem.Text, txtallotno.Text, txtannincme.Text, txtaddmno.Text, txttop.Text, txtamtpaid.Text, txtpwd.Text, txtrepwd.Text); //if (str == "1") string str = cn.streg(txtregno.Text, txtid.Text, ddldept.SelectedItem.Text, txtname.Text, txtperno.Text, txtfname.Text, txtfphno.Text, txtmname.Text, txtmphno.Text, txtdb.Text, txtfoc.Text, txtnapl.Text, txttmpadd.Text, txtpinco.Text, txtperadd.Text, txtppinco.Text, ddlmoa.SelectedItem.Text, txteamra.Text, txthaltickno.Text, txtmailid.Text, txtbssc.Text, txtpssc.Text, txtsscm.Text, txtb1stinter.Text, txtp1stinter.Text, txt1stinterm.Text, txtb2ndinter.Text, txtp2ndinter.Text, txt2ndinterm.Text, txtpwd.Text, txtrepwd.Text, txtdt.Text, txttamt.Text, txtpamt.Text); if (str == "1") { string i = txtid.Text; MessageBox.Show("Successfully Register the student Of Id"); Response.Redirect("HOME.aspx"); txtid.Text = ""; //txtaddmno.Text = ""; //txtallotno.Text = ""; //txtamtpaid.Text = ""; //txtannincme.Text = ""; //txtbalnce.Text = ""; txtdb.Text = ""; txtfname.Text = ""; txtmname.Text = ""; txtentmar.Text = ""; //txtgender.Text = ""; txthaltickno.Text = ""; txtp2ndinter.Text = ""; txtp1stinter.Text = ""; txtpssc.Text = ""; txtb2ndinter.Text = ""; txtbssc.Text = ""; txtb1stinter.Text = ""; txtsscm.Text = ""; txt1stinterm.Text = ""; txt2ndinterm.Text = ""; txtentmar.Text = ""; txtname.Text = ""; txtmailid.Text = ""; txtppinco.Text = ""; txtpinco.Text = ""; txtnapl.Text = ""; txteamra.Text = ""; txtregno.Text = ""; txttmpadd.Text = ""; txtperadd.Text = ""; txtperno.Text = ""; txtfphno.Text = ""; txtfoc.Text = ""; txtmphno.Text = ""; txtrepwd.Text = ""; txtpwd.Text = ""; } } }
/* protected void btnsbmt_Click(object sender, EventArgs e) * { * * }*/ protected void btnsbmt_Click(object sender, EventArgs e) { cn.connect(); //string str = cn.stfreg(txtstfregno.Text, txtidno.Text, txtname.Text, txtfana.Text, txtdob.Text, ddldpt.SelectedItem.Text, ddlmasts.SelectedItem.Text, txtphno.Text, txtpanno.Text, txtemailid.Text, txtgender.Text, txttemadd.Text, txttpin.Text, txtperadd.Text, txtppin.Text, txtqua.Text, txtexp.Text, ddldesi.SelectedItem.Text, txtteach.Text, txtpub.Text, txtind.Text, txtpwd.Text, txtrepwd.Text); //if (str == "1") //{ // MessageBox.Show("REGISTERED SUCCESSFULLY"); //} //else //{ // MessageBox.Show("NOT REGISTERED"); //} if (txtidno.Text == "") { MessageBox.Show("Select Department And Click On Generate Id button to generate the Student ID"); } else if (txtname.Text == "") { MessageBox.Show("Enter Candidate Name"); } else if (txtfana.Text == "") { MessageBox.Show("Enter Father's/Husband's/Guardian's Name"); } else if (txtdob.Text == "") { MessageBox.Show("Enter Date Of Birth"); } else if (ddldpt.SelectedItem.Text == "") { MessageBox.Show("Select The Department"); } else if (txtphno.Text == "") { MessageBox.Show("Enter Phone Number"); } else if (txtpanno.Text == "") { MessageBox.Show("Enter PanCard Number"); } else if (txtemailid.Text == "") { MessageBox.Show("Enter Valid ID"); } else if (txtgender.Text == "") { MessageBox.Show("Enter Gender"); } else if (txttemadd.Text == "") { MessageBox.Show("Enter Temporary Address"); } else if (txtperadd.Text == "") { MessageBox.Show("Enter Permanent Address"); } else if (txtpwd.Text == "") { MessageBox.Show("Enter Password"); } else if (txtrepwd.Text == "") { MessageBox.Show("Re-Enter Password"); } else if (txtqua.Text == "") { MessageBox.Show("Enter Qualification"); } else if (txtexp.Text == "") { MessageBox.Show("Enter Experience"); } else { //string str = con1.StReg(txtid.Text, ddldept.SelectedItem.Text, txtfname.Text, txtlname.Text, txtfname.Text, txtdob.Text, txtperdet.Text, txtperdet.Text, txtmail.Text, txtnationality.Text, txtrno.Text, txtmobile.Text, txttenname.Text, txttenspec.Text, txtyop.Text, txttenaggre.Text, txtintername.Text, txtintersec.Text, txtinteryop.Text, txtinteraggre.Text, txthtn.Text, txtrank.Text, txtjdt.Text, ddlcaste.SelectedItem.Text, txtallotno.Text, txtannincme.Text, txtaddmno.Text, txttop.Text, txtamtpaid.Text, txtpwd.Text, txtrepwd.Text); //if (str == "1") string str = cn.stfreg(txtstfregno.Text, txtidno.Text, txtname.Text, txtfana.Text, txtdob.Text, ddldpt.SelectedItem.Text, ddlmasts.SelectedItem.Text, txtphno.Text, txtpanno.Text, txtemailid.Text, txtgender.Text, txttemadd.Text, txttpin.Text, txtperadd.Text, txtppin.Text, txtqua.Text, txtexp.Text, ddldesi.SelectedItem.Text, txtteach.Text, txtpub.Text, txtind.Text, txtpwd.Text, txtrepwd.Text); if (str == "1") { string i = txtidno.Text; MessageBox.Show("Successfully Register"); Response.Redirect("HOME.aspx"); txtidno.Text = ""; txtdob.Text = ""; txtfana.Text = ""; ddldpt.SelectedItem.Text = ""; ddlmasts.SelectedItem.Text = ""; txtgender.Text = ""; txtname.Text = ""; txtphno.Text = ""; txtpanno.Text = ""; txtemailid.Text = ""; txttemadd.Text = ""; txttpin.Text = ""; txtperadd.Text = ""; txtppin.Text = ""; txtqua.Text = ""; txtexp.Text = ""; ddldesi.SelectedItem.Text = ""; txtteach.Text = ""; txtpub.Text = ""; txtind.Text = ""; txtrepwd.Text = ""; txtpwd.Text = ""; } else { MessageBox.Show("NOT REGISTERED"); } } }