Exemple #1
0
    protected void PaginateTheData(object sender, GridViewPageEventArgs e)
    {
        List <string> list  = new List <string>();
        DataTable     table = this.GetData();

        table.DefaultView.Sort        = (String)Session["sortExpressionH"] + (String)Session["directionH"];
        GridViewHist.DataSource       = table;
        ViewState["SelectedRecordsH"] = list;
        GridViewHist.PageIndex        = e.NewPageIndex;
        GridViewHist.DataBind();
    }
Exemple #2
0
 private void BindData()
 {
     // specify the data source for the GridView
     GridViewHist.DataSource = this.GetData();
     // bind the data now
     GridViewHist.DataBind();
     if (GridViewHist.Rows.Count == 0)
     {
         LabelOK.Visible = true;
         LabelOK.Text    = "Il n'y a pas de historique pour cet acquereur.";
     }
     else
     {
         LabelOK.Visible = false;
     }
 }
Exemple #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            tripDAO tripDAO = new tripDAO();

            List <trip> studyTrip = new List <trip>();

            studyTrip = tripDAO.getStudyTrip();
            GridViewTrip.DataSource = studyTrip;
            GridViewTrip.DataBind();

            List <trip> studyTripHist = new List <trip>();

            studyTripHist           = tripDAO.getStudyTripHist();
            GridViewHist.DataSource = studyTripHist;
            GridViewHist.DataBind();
        }
Exemple #4
0
 private void BindData()
 {
     // specify the data source for the GridView
     GridViewHist.DataSource = this.GetData();
     // bind the data now
     GridViewHist.DataBind();
     if (GridViewHist.Rows.Count == 0)
     {
         LabelOK.Visible = true;
         LabelOK.Text    = "Il n'y a pas eu de visites sur ce bien";
     }
     else
     {
         LabelOK.Visible = false;
     }
 }
Exemple #5
0
    protected void SortRecords(object sender, GridViewSortEventArgs e)
    {
        Session["sortExpressionH"] = e.SortExpression;
        Session["directionH"]      = string.Empty;

        if (SortDirection == SortDirection.Ascending)
        {
            SortDirection         = SortDirection.Descending;
            Session["directionH"] = " DESC";
        }
        else
        {
            SortDirection         = SortDirection.Ascending;
            Session["directionH"] = " ASC";
        }
        DataTable table = this.GetData();

        table.DefaultView.Sort  = (String)Session["sortExpressionH"] + (String)Session["directionH"];
        GridViewHist.DataSource = table;
        GridViewHist.DataBind();
    }
Exemple #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                trip    tripOjb = new trip();
                tripDAO tripDAO = new tripDAO();
                //tripOjb = tripDAO.getTripById(1);
                //Lbl_country.Text = tripOjb.Country;
                //Lbl_description.Text = tripOjb.Description;

                List <trip> tripList = new List <trip>();
                tripList = tripDAO.getTripInfo();
                GridViewTrip.DataSource = tripList;
                GridViewTrip.DataBind();

                List <trip> tripHist = new List <trip>();
                tripHist = tripDAO.getTripHist();
                GridViewHist.DataSource = tripHist;
                GridViewHist.DataBind();
            }
            if (Session["Username"] == null)
            {
            }
        }