protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["sid"] == null)
            {
                Response.Redirect("../Default.aspx");
            }
            _studentBL = new StudentBL();
            List <Student> _StudentList = new List <Student>();

            _StudentList = _studentBL.BL_Student_Select_BY_SID(Convert.ToInt32(Session["sid"].ToString()));

            Image2.ImageUrl = _StudentList[0].Img.ToString();
            lblname.Text    = _StudentList[0].STUDENTNAME.ToString();
        }
Пример #2
0
        protected void Button12_Click(object sender, EventArgs e)
        {
            MultiView1.ActiveViewIndex = 0;
            List <Student> _StudentList = new List <Student>();

            _StudentBL   = new StudentBL();
            _StudentList = _StudentBL.BL_Student_Select_BY_SID(Convert.ToInt32(Session["sid"].ToString()));

            lblnam.Text     = _StudentList[0].STUDENTNAME.ToString();
            lblmobile.Text  = _StudentList[0].MOBILE.ToString();
            lbladd.Text     = _StudentList[0].ADD.ToString();
            lblcity.Text    = _StudentList[0].CITY.ToString();
            lblpincode.Text = _StudentList[0].PINCODE.ToString();
            lblemail.Text   = _StudentList[0].EMAIL.ToString();
        }
Пример #3
0
        protected void Button13_Click(object sender, EventArgs e)
        {
            MultiView1.ActiveViewIndex = 1;

            List <Student> _StudentList = new List <Student>();

            _StudentBL   = new StudentBL();
            _StudentList = _StudentBL.BL_Student_Select_BY_SID(Convert.ToInt32(Session["sid"].ToString()));

            txtname.Text  = _StudentList[0].STUDENTNAME.ToString();
            txtname0.Text = _StudentList[0].MOBILE.ToString();
            txtname1.Text = _StudentList[0].ADD.ToString();
            txtname2.Text = _StudentList[0].CITY.ToString();
            txtname3.Text = _StudentList[0].PINCODE.ToString();
            txtname4.Text = _StudentList[0].EMAIL.ToString();
        }
Пример #4
0
        protected void Button12_Click(object sender, EventArgs e)
        {
            if (drppublication.SelectedIndex == 0)
            {
                lblmsg.Text      = "Select Student First !!";
                lblmsg.ForeColor = System.Drawing.Color.Red; MultiView1.ActiveViewIndex = -1;
            }
            else if (drpbook.SelectedIndex == 0)
            {
                lblmsg.Text      = "Select Book !!";
                lblmsg.ForeColor = System.Drawing.Color.Red; MultiView1.ActiveViewIndex = -1;
            }
            else
            {
                MultiView1.ActiveViewIndex = 0;

                List <Book> _BookList = new List <Book>();
                _BookBL = new BookBL();

                _BookList = _BookBL.BL_BOOK_Select_BY_BNAME(drpbook.SelectedItem.Text);

                ViewState["BBID"] = _BookList[0].BID.ToString();
                lblbname.Text     = _BookList[0].BookName.ToString();
                lblauthor.Text    = _BookList[0].Author.ToString();
                lblbran.Text      = _BookList[0].Branch.ToString();
                lblpub.Text       = _BookList[0].Publication.ToString();
                lblprice.Text     = _BookList[0].Price.ToString();

                Image2.ImageUrl = _BookList[0].Image.ToString();


                List <Student> _StudentList = new List <Student>();
                _StudentBL = new StudentBL();

                _StudentList    = _StudentBL.BL_Student_Select_BY_SID(Convert.ToInt32(drppublication.SelectedValue));
                lblstudent.Text = _StudentList[0].STUDENTNAME.ToString();


                List <Rent> __RentList = new List <Rent>();
                _RentBL    = new RentBL();
                __RentList = _RentBL.BL_Student_Select_BY_SID_BName_Status(Convert.ToInt32(drppublication.SelectedValue), drpbook.SelectedItem.Text, 0);

                lbldays.Text      = __RentList[0].Days.ToString();
                lblidate.Text     = __RentList[0].IssueDate.ToString();
                ViewState["RRID"] = __RentList[0].RID.ToString();
            }
        }
        protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            MultiView1.ActiveViewIndex = 1;
            List <Student> _StudentList = new List <Student>();

            _StudentBL   = new StudentBL();
            _StudentList = _StudentBL.BL_Student_Select_BY_SID(Convert.ToInt32(e.CommandArgument.ToString()));

            lblid.Text      = _StudentList[0].SID.ToString();
            lblname.Text    = _StudentList[0].STUDENTNAME.ToString();
            lblbranch.Text  = _StudentList[0].BRANCHNAME.ToString();
            lblmobile.Text  = _StudentList[0].MOBILE.ToString();
            lbladdress.Text = _StudentList[0].ADD.ToString();
            lblcity.Text    = _StudentList[0].CITY.ToString();
            lblpin.Text     = _StudentList[0].PINCODE.ToString();
            //  DateTime dobb = Convert.ToDateTime(SDT.Rows[0]["dob"].ToString());
            //   lbldob.Text = dobb.GetDateTimeFormats()[7].ToString();
            lblemai.Text = _StudentList[0].EMAIL.ToString();
            lblpass.Text = _StudentList[0].Pass.ToString();
        }
Пример #6
0
        protected void btnupdate_Click(object sender, EventArgs e)
        {
            int result = 0;

            _StudentBL = new StudentBL();
            result     = _StudentBL.BL_Student_Update(Convert.ToInt32(Session["sid"].ToString()), txtname.Text, txtname4.Text, txtname0.Text, txtname1.Text, txtname2.Text, txtname3.Text);
            if (result != 0)
            {
                MultiView1.ActiveViewIndex = 0;
                List <Student> _StudentList = new List <Student>();
                _StudentBL   = new StudentBL();
                _StudentList = _StudentBL.BL_Student_Select_BY_SID(Convert.ToInt32(Session["sid"].ToString()));

                lblnam.Text     = _StudentList[0].STUDENTNAME.ToString();
                lblmobile.Text  = _StudentList[0].MOBILE.ToString();
                lbladd.Text     = _StudentList[0].ADD.ToString();
                lblcity.Text    = _StudentList[0].CITY.ToString();
                lblpincode.Text = _StudentList[0].PINCODE.ToString();
                lblemail.Text   = _StudentList[0].EMAIL.ToString();
            }
        }