Example #1
0
    protected void LinkButtonInbox_Click(object sender, EventArgs e)
    {
        MultiView2.ActiveViewIndex = 2;
        string    query = "SELECT Message, [From], Datetime, Seen, Id FROM Messages WHERE [To] ='Admin' ORDER BY Datetime DESC, [From];select f.FilePath, f.Datetime,f.[From],f.Seen,f.Id from Files f where f.[To]='Admin' order by f.Datetime desc";
        dbConnect db    = new dbConnect();
        DataSet   dset  = db.executeSelectStatemant(query);

        ListViewMessages.DataSource = dset.Tables[0];
        ListViewMessages.DataBind();
        ListViewFiles.DataSource = dset.Tables[1];
        ListViewFiles.DataBind();
    }
Example #2
0
    protected void LinkButtonInbox_Click(object sender, EventArgs e)
    {
        MultiView1.ActiveViewIndex = 2;
        string    query = "SELECT Message, [From], Datetime, Seen, Id FROM Messages WHERE [To] ='Dept-" + id + "' ORDER BY Datetime DESC, [From]";
        dbConnect db    = new dbConnect();
        DataSet   dset  = db.executeSelectStatemant(query);

        if (!dset.HasErrors && dset.Tables[0].Rows.Count > 0)
        {
            ListViewMessages.DataSource = dset.Tables[0];
            ListViewMessages.DataBind();
        }
        query = "select f.FilePath, f.Datetime,f.[From],f.Seen,f.Id from Files f where f.[To]='Dept-" + id + "' order by f.Datetime desc";
        dset.Clear();
        dset = db.executeSelectStatemant(query);
        if ((!dset.HasErrors) && dset.Tables[0].Rows.Count > 0)
        {
            ListViewFiles.DataSource = dset.Tables[0];
            ListViewFiles.DataBind();
        }
    }
Example #3
0
 protected void TimerRefresh_Tick(object sender, EventArgs e)
 {
     ListViewMessages.DataBind();
 }