Ejemplo n.º 1
0
    public void StudentSearchBox()
    {
        AbcDAL MyDAL = new AbcDAL("");

        DataTable ResultTable = MyDAL.PopulateStudent();

        MyDAL.BindStudentCombobox(RCBStudentName);
    }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        int    AuthorityID = 0;
        AbcDAL MyDAL       = new AbcDAL("");

        if (!IsPostBack)
        {
            MyDAL.BindSubjectComboBox(RCBSubject);
            MyDAL.BindStudentCombobox(RCBStudent);

            //AbcDAL MyDAL = new AbcDAL("");
            DataTable ResultTable = MyDAL.PopulateStudent();


            AuthorityID = Convert.ToInt32(ResultTable.Rows[0]["AuthorityID"]); //Getting my field value
            if (AuthorityID != 1002)
            {
                Response.Redirect("~/default.aspx?MsgPos=5&MsgType=warning&MsgContent=You are not authorised to this function, No students allowed !!!!");
            }
        }
    }