Beispiel #1
0
        private void BinddgEvents()
        {
            DataTable dt = CalendarEntry.GetListEventsUpdatedByUserDataTable(NumOfDays, ProjectID);

            ViewState["EventsRowCount"] = dt.Rows.Count;

            if (dt.Rows.Count == 0 ||
                (pc["ProjectUSetup_ShowMyEvents"] != null && pc["ProjectUSetup_ShowMyEvents"] == "False"))
            {
                sep4.Visible = false;
                Pan4.Visible = false;
            }
            else if (PageSize >= dt.Rows.Count)
            {
                dgEvents.PagerStyle.Visible = false;
            }

            dgEvents.PageSize = PageSize;
            dgEvents.Columns[0].HeaderText = LocRM.GetString("Title");
            dgEvents.Columns[1].HeaderText = LocRM.GetString("Modify");
            dgEvents.CurrentPageIndex      = (int)ViewState["dgEvents"];
            dgEvents.DataSource            = dt.DefaultView;
            dgEvents.DataBind();
        }