public void sortByAction(string act)
    {
        SqlCommand cmd = new SqlCommand("SELECT dbo.AcademicAdviserConsultations.ConsultationDateTime, dbo.AcademicAdviserConsultations.ConsultationCode, dbo.AcademicAdviserConsultations.NatureOfAdvising, dbo.AcademicAdviserConsultations.ActionTaken FROM dbo.AcademicAdviserConsultations INNER JOIN dbo.AcademicAdviser ON dbo.AcademicAdviserConsultations.AAdviserId = dbo.AcademicAdviser.AAdviserId WHERE dbo.AcademicAdviserConsultations.Status = 'DONE' and dbo.AcademicAdviser.UserId = " + Session["UserId"] + " and dbo.AcademicAdviserConsultations.ActionTaken = '" + act + "';");

        ListViewAHistory.DataSource = Class2.getDataSet(cmd);
        ListViewAHistory.DataBind();
    }
    public void sortByRef(object sender, EventArgs e)
    {
        SqlCommand cmd = new SqlCommand("SELECT dbo.AcademicAdviserConsultations.ConsultationDateTime, dbo.AcademicAdviserConsultations.ConsultationCode, dbo.AcademicAdviserConsultations.NatureOfAdvising, dbo.AcademicAdviserConsultations.ActionTaken FROM dbo.AcademicAdviserConsultations INNER JOIN dbo.AcademicAdviser ON dbo.AcademicAdviserConsultations.AAdviserId = dbo.AcademicAdviser.AAdviserId WHERE dbo.AcademicAdviserConsultations.Status = 'DONE' and dbo.AcademicAdviserConsultations.ActionTaken <> 'For Follow Up' and dbo.AcademicAdviserConsultations.ActionTaken <> 'Resolved' and dbo.AcademicAdviser.UserId = " + Session["UserId"]);

        ListViewAHistory.DataSource = Class2.getDataSet(cmd);
        ListViewAHistory.DataBind();
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        checkUsertype.filter("FACULTY", Session["UserType"].ToString());

        SqlCommand cmd = new SqlCommand("SELECT dbo.AcademicAdviserConsultations.ConsultationDateTime, dbo.AcademicAdviserConsultations.ConsultationCode, dbo.AcademicAdviserConsultations.NatureOfAdvising, dbo.AcademicAdviserConsultations.ActionTaken FROM dbo.AcademicAdviserConsultations INNER JOIN dbo.AcademicAdviser ON dbo.AcademicAdviserConsultations.AAdviserId = dbo.AcademicAdviser.AAdviserId WHERE dbo.AcademicAdviserConsultations.Status = 'DONE' and dbo.AcademicAdviser.UserId = " + Session["UserId"]);

        ListViewAHistory.DataSource = Class2.getDataSet(cmd);
        ListViewAHistory.DataBind();
    }
Esempio n. 4
0
    protected void Page_Load(object sender, EventArgs e)
    {
        try
        {
            checkUsertype.filter("FACULTY", Session["UserType"].ToString());
        }
        catch (Exception ex)
        {
            ScriptManager.RegisterStartupScript(this, this.GetType(), "alert", "alert('You have been inactive for too long. Please relogin.');window.location ='Out.aspx';", true);
        }

        try
        {
            SqlCommand cmd = new SqlCommand("SELECT dbo.AcademicAdviserConsultations.ConsultationDateTime, (SELECT dbo.Student.StudentName FROM Student WHERE Student.StudentNumber = AcademicAdviserConsultations.StudentNumber) as [Student Name], dbo.AcademicAdviserConsultations.ConsultationCode, dbo.AcademicAdviserConsultations.NatureOfAdvising, dbo.AcademicAdviserConsultations.ActionTaken FROM dbo.AcademicAdviserConsultations INNER JOIN dbo.AcademicAdviser ON dbo.AcademicAdviserConsultations.AAdviserId = dbo.AcademicAdviser.AAdviserId WHERE dbo.AcademicAdviserConsultations.Status = 'DONE' and dbo.AcademicAdviser.UserId = " + Session["UserId"]);

            ListViewAHistory.DataSource = Class2.getDataSet(cmd);
            ListViewAHistory.DataBind();
        }
        catch (Exception ex)
        {
        }
    }