protected void Button7_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.Select_By_STD_DIV(drpstd.SelectedItem.Text, drpdiv.SelectedItem.Text);
     GridView1.DataSource = StuDT;
     GridView1.DataBind();
     lbl.Text = "Total Student = " + GridView1.Rows.Count.ToString();
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());


            AttDT            = AttAdapter.Select_By_ROLLNO(StuDT.Rows[0]["rollno"].ToString());
            lbltotalatt.Text = AttDT.Rows.Count.ToString();


            AttDT           = AttAdapter.Select_Roll_Atatus(StuDT.Rows[0]["rollno"].ToString(), "Present");
            lblpresent.Text = AttDT.Rows.Count.ToString();

            AttDT          = AttAdapter.Select_Roll_Atatus(StuDT.Rows[0]["rollno"].ToString(), "Absent");
            lblabsent.Text = AttDT.Rows.Count.ToString();

            AttDT         = AttAdapter.Select_Roll_Atatus(StuDT.Rows[0]["rollno"].ToString(), "Leave");
            lblleave.Text = AttDT.Rows.Count.ToString();

            LeaveDT            = LeaveAdapter.Select_By_RollNo(StuDT.Rows[0]["rollno"].ToString());
            lbltotalleave.Text = LeaveDT.Rows.Count.ToString();


            CompDT = CompAdapter.Select_By_ROLL(StuDT.Rows[0]["rollno"].ToString());
            lbltotalattcompl.Text = CompDT.Rows.Count.ToString();
        }
    }
 protected void Button7_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.Select_By_STD_DIV(lblstd.Text, drpdiv.SelectedItem.Text);
     GridView1.DataSource = StuDT;
     GridView1.DataBind();
     MultiView1.ActiveViewIndex = 0;
 }
Exemplo n.º 4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Page.IsPostBack == false)
     {
         StuDT       = StuAdapter.Select_UNAME(Session["sname"].ToString());
         Label1.Text = StuDT.Rows[0]["name"].ToString();
     }
 }
Exemplo n.º 5
0
    protected void btnappluleave_Click(object sender, EventArgs e)
    {
        StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());

        LeaveAdapter.Insert(StuDT.Rows[0]["rollno"].ToString(), StuDT.Rows[0]["Name"].ToString(), StuDT.Rows[0]["stdname"].ToString(), txtmsg.Text, Convert.ToInt32(DropDownList1.SelectedItem.Text), "Pending");
        lbl.Text    = "Apply for leave successfully";
        txtmsg.Text = "";
        DropDownList1.SelectedIndex = 0;
    }
Exemplo n.º 6
0
    protected void Button8_Click(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 1;
        StuDT   = StuAdapter.Select_UNAME(Session["sname"].ToString());
        LeaveDT = LeaveAdapter.Select_By_RollNo(StuDT.Rows[0]["rollno"].ToString());

        GridView1.DataSource = LeaveDT;
        GridView1.DataBind();
    }
    protected void drpdiv_SelectedIndexChanged(object sender, EventArgs e)
    {
        StuDT = StuAdapter.Select_By_STD_DIV(drpstd.SelectedItem.Text, drpdiv.SelectedItem.Text);

        drpstudent.DataSource     = StuDT;
        drpstudent.DataTextField  = "rollno";
        drpstudent.DataValueField = "sid";
        drpstudent.DataBind();
        drpstudent.Items.Insert(0, "SELECT");
    }
 protected void btnstudenlogin_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.Select_LOGIN(txtstuuname.Text, txtstupass.Text);
     if (StuDT.Rows.Count == 1)
     {
     }
     else
     {
         lblstuerror.Text = "Login Error !!";
     }
 }
 protected void btnsend_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());
     CompAdapter.Insert(StuDT.Rows[0]["rollno"].ToString(), StuDT.Rows[0]["Name"].ToString(), txtsubj.Text, txtmsg.Text, "Pending");
     CompDT = CompAdapter.SelectCompalin();
     GridView1.DataSource = CompDT;
     GridView1.DataBind();
     lbl.Text     = "complain Sent";
     txtmsg.Text  = "";
     txtsubj.Text = "";
 }
Exemplo n.º 10
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());

            lblname.Text = StuDT.Rows[0]["Name"].ToString();
            lblroll.Text = StuDT.Rows[0]["rollno"].ToString();

            ViewState["sid"] = StuDT.Rows[0]["SID"].ToString();
        }
    }
 protected void btnstudenlogin_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.Select_LOGIN(txtstuuname.Text, txtstupass.Text);
     if (StuDT.Rows.Count == 1)
     {
         Session["sname"] = txtstuuname.Text;
         Response.Redirect("Student/Main.aspx");
     }
     else
     {
         lblstuerror.Text = "Login Error !!";
     }
 }
Exemplo n.º 12
0
 protected void btnchangepass_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.Select_Check_Current_pas(txtcurrent.Text, Session["sname"].ToString());
     if (StuDT.Rows.Count == 1)
     {
         StuAdapter.StudentMST_SELECT_ChangePass(txtnewpass.Text, Session["sname"].ToString());
         lbl.Text = "Password Changed";
     }
     else
     {
         lbl.Text = "Invalid Current Password";
     }
 }
    protected void btnreport_Click(object sender, EventArgs e)
    {
        if (drpmonth.SelectedIndex == 0)
        {
            lbl.Text = "Select month first !!";
        }
        else
        {
            StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());

            AttDT = AttAdapter.Select_Roll_month(StuDT.Rows[0]["rollno"].ToString(), "%" + drpmonth.SelectedValue + "%");

            GridView1.DataSource = AttDT;
            GridView1.DataBind();
            lbl.Text = "Result = " + GridView1.Rows.Count.ToString();
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack == false)
        {
            StuDT = StuAdapter.Select_UNAME(Session["sname"].ToString());

            lblname.Text = StuDT.Rows[0]["Name"].ToString();
            lblroll.Text = StuDT.Rows[0]["rollno"].ToString();

            txtemail.Text       = StuDT.Rows[0]["email"].ToString();
            txtmobile.Text      = StuDT.Rows[0]["mobile"].ToString();
            txtadd.Text         = StuDT.Rows[0]["add"].ToString();
            txtcity.Text        = StuDT.Rows[0]["city"].ToString();
            txtpin.Text         = StuDT.Rows[0]["pincode"].ToString();
            Imgprofile.ImageUrl = StuDT.Rows[0]["image"].ToString();
            ViewState["sid"]    = StuDT.Rows[0]["SID"].ToString();
        }
    }
    protected void btnstuadd_Click(object sender, EventArgs e)
    {
        if (FileUpload1.HasFile)
        {
            FileUpload1.SaveAs(Server.MapPath("~/Studentimg/" + FileUpload1.FileName));
            DateTime bdate = Convert.ToDateTime(drpdd.SelectedItem.Text + " " + drpmm.SelectedItem.Text + " " + drpyyyy.SelectedItem.Text);

            StuAdapter.Insert(txtroll.Text, txtname.Text, lblstd.Text, drpdiv.SelectedItem.Text, txtemail.Text, txtmobi.Text, bdate.GetDateTimeFormats()[8].ToString(), "~/Studentimg/" + FileUpload1.FileName, txtadd.Text, txtcity.Text, txtpin.Text, txtuname.Text, txtpass.Text);
            lblmsg.Text           = "Student Added.";
            txtname.Text          = "";
            txtadd.Text           = "";
            txtcity.Text          = "";
            txtemail.Text         = "";
            txtmobi.Text          = ""; txtpass.Text = "";
            txtpin.Text           = "";
            txtuname.Text         = "";
            txtcpass.Text         = "";
            drpdd.SelectedIndex   = 0;
            drpmm.SelectedIndex   = 0;
            drpyyyy.SelectedIndex = 0;


            DivDT       = DivAdapter.SELECT_BY_ID(Convert.ToInt32(drpdiv.SelectedValue));
            lblcnt.Text = "Total Seat = " + DivDT.Rows[0]["Seat"].ToString();
            MultiView1.ActiveViewIndex = 0;

            StuDT = StuAdapter.Select_By_STD_DIV(lblstd.Text, drpdiv.SelectedItem.Text);
            int rstu = Convert.ToInt32(DivDT.Rows[0]["Seat"].ToString()) - Convert.ToInt32(StuDT.Rows.Count.ToString());
            lblstudent.Text = "Total Admitted =" + StuDT.Rows.Count.ToString() + " , Remaining Student = " + rstu;

            string stddd = lblstd.Text.Substring(0, 1);
            int    rno   = Convert.ToInt32(StuDT.Rows.Count.ToString()) + 1;
            if (rno.ToString().Length < 2)
            {
                string newrno = "0" + rno.ToString();
                txtroll.Text = stddd + drpdiv.SelectedItem.Text + newrno;
            }
            else
            {
                txtroll.Text = stddd + drpdiv.SelectedItem.Text + rno;
            }
        }
    }
 protected void btnsarch_Click(object sender, EventArgs e)
 {
     StuDT = StuAdapter.SELECT_BY_ID(Convert.ToInt32(drpstudent.SelectedValue));
     if (StuDT.Rows.Count == 1)
     {
         lblroll.Text               = StuDT.Rows[0]["rollno"].ToString();
         lblname.Text               = StuDT.Rows[0]["name"].ToString();
         lblemail.Text              = StuDT.Rows[0]["email"].ToString();
         lblmobile.Text             = StuDT.Rows[0]["mobile"].ToString();
         lbldob.Text                = StuDT.Rows[0]["dob"].ToString();
         lbladd.Text                = StuDT.Rows[0]["add"].ToString();
         lblcity.Text               = StuDT.Rows[0]["city"].ToString();
         lblpin.Text                = StuDT.Rows[0]["pincode"].ToString();
         lbluname.Text              = StuDT.Rows[0]["uname"].ToString();
         lblpass.Text               = StuDT.Rows[0]["pass"].ToString();
         imgg.ImageUrl              = StuDT.Rows[0]["image"].ToString();
         MultiView1.ActiveViewIndex = 0;
     }
     else
     {
         MultiView1.ActiveViewIndex = -1;
     }
 }
    protected void Button7_Click(object sender, EventArgs e)
    {
        DivDT       = DivAdapter.SELECT_BY_ID(Convert.ToInt32(drpdiv.SelectedValue));
        lblcnt.Text = "Total Seat = " + DivDT.Rows[0]["Seat"].ToString();
        MultiView1.ActiveViewIndex = 0;

        StuDT = StuAdapter.Select_By_STD_DIV(lblstd.Text, drpdiv.SelectedItem.Text);
        int rstu = Convert.ToInt32(DivDT.Rows[0]["Seat"].ToString()) - Convert.ToInt32(StuDT.Rows.Count.ToString());

        lblstudent.Text = "Total Admitted =" + StuDT.Rows.Count.ToString() + " , Remaining Student = " + rstu;

        string stddd = lblstd.Text.Substring(0, 1);
        int    rno   = Convert.ToInt32(StuDT.Rows.Count.ToString()) + 1;

        if (rno.ToString().Length < 2)
        {
            string newrno = "0" + rno.ToString();
            txtroll.Text = stddd + drpdiv.SelectedItem.Text + newrno;
        }
        else
        {
            txtroll.Text = stddd + drpdiv.SelectedItem.Text + rno;
        }
    }