Пример #1
0
		public void ShowList()
		{
			pnlList.Visible = true;
			pnlEdit.Visible = false;
			dgOccurrenceTypeGroups.EditItemIndex = -1;
			dgOccurrenceTypeGroups.SelectedIndex = -1;

			dgOccurrenceTypeGroups.AddEnabled = false;
			dgOccurrenceTypeGroups.AllowSorting = true;
			dgOccurrenceTypeGroups.DeleteEnabled = false;
			dgOccurrenceTypeGroups.EditEnabled = false;
			dgOccurrenceTypeGroups.ExportEnabled = true;
			dgOccurrenceTypeGroups.ItemAltBgColor = CurrentPortalPage.Setting( "ItemAltBgColor", string.Empty, false );
			dgOccurrenceTypeGroups.ItemBgColor = CurrentPortalPage.Setting( "ItemBgColor", string.Empty, false );
			dgOccurrenceTypeGroups.ItemMouseOverColor = CurrentPortalPage.Setting( "ItemMouseOverColor", string.Empty, false );
			dgOccurrenceTypeGroups.ItemType = "Attendance Type Category";
			dgOccurrenceTypeGroups.MailEnabled = false;
			dgOccurrenceTypeGroups.MergeEnabled = false;
			dgOccurrenceTypeGroups.MoveEnabled = false;
			dgOccurrenceTypeGroups.SourceTableKeyColumnName = "group_id";
			dgOccurrenceTypeGroups.SourceTableName = "core_occurrence_type_group";

			dgOccurrenceTypeGroups.DataSource = new OccurrenceTypeGroupData().GetOccurrenceTypeGroupByOrganizationID_DT( base.CurrentPortal.OrganizationID );
			dgOccurrenceTypeGroups.DataBind();
		}
Пример #2
0
 private void ShowList()
 {
     dgActions.ItemType                   = "Action";
     dgActions.ItemBgColor                = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
     dgActions.ItemAltBgColor             = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
     dgActions.ItemMouseOverColor         = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
     dgActions.AddEnabled                 = true;
     dgActions.AddImageUrl                = "~/images/add_action.png";
     dgActions.MoveEnabled                = true;
     dgActions.SourceTableName            = "cust_ccv_data_action";
     dgActions.SourceTableKeyColumnName   = "action_id";
     dgActions.SourceTableOrderColumnName = "action_order";
     dgActions.DeleteEnabled              = true;
     dgActions.EditEnabled                = true;
     dgActions.EditOverride               = true;
     dgActions.MergeEnabled               = false;
     dgActions.MailEnabled                = false;
     dgActions.ExportEnabled              = true;
     dgActions.AllowSorting               = false;
     dgActions.AddIsAsync                 = true;
     dgActions.EditIsAsync                = true;
     dgActions.DeleteIsAsync              = true;
     dgActions.DataSource                 = new Arena.Custom.CCV.DataLayer.Data.ActionData().GetActions_DT();
     dgActions.DataBind();
 }
Пример #3
0
        public void ShowList()
        {
            ArrayList lst = new ArrayList();

            lst.Add(new SqlParameter("@FromDate", tbFilterFrom.SelectedDate));
            lst.Add(new SqlParameter("@ToDate", tbFilterTo.SelectedDate));
            lst.Add(new SqlParameter("@Pastor", Convert.ToInt32(ddlPastor.SelectedValue)));
            lst.Add(new SqlParameter("@Processed", cbProcessed.Checked));
            DataSet ds = new Arena.DataLayer.Organization.OrganizationData().ExecuteDataSet("cust_ccv_sp_era_loss_report", lst);

            dgLosses.Columns[3].Visible = cbProcessed.Checked;
            dgLosses.Columns[6].Visible = ddlPastor.SelectedValue == "0";

            dgLosses.ItemType           = "Family";
            dgLosses.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgLosses.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgLosses.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgLosses.AddEnabled         = false;
            dgLosses.DeleteEnabled      = false;
            dgLosses.EditEnabled        = false;
            dgLosses.MergeEnabled       = false;
            dgLosses.MailEnabled        = false;
            dgLosses.ExportEnabled      = true;
            dgLosses.DataSource         = ds.Tables[0];
            dgLosses.DataBind();
        }
Пример #4
0
        public void ShowList()
        {
            DataTable dt = new PersonSettingData().GetPersonSettingByPersonId_DT(Person.PersonID, CurrentOrganization.OrganizationID);

            if (tbKeyFilter.Text.Trim() != string.Empty)
            {
                foreach (DataRow row in dt.Rows)
                {
                    if (!row["key"].ToString().Trim().ToLower().StartsWith(tbKeyFilter.Text.Trim().ToLower()))
                    {
                        row.Delete();
                    }
                }
                dt.AcceptChanges();
            }

            pnlPersonSettings.Visible = true;
            dgPersonSettings.Visible  = true;
            pnlDetails.Visible        = false;

            ihPersonSettingID.Value = string.Empty;

            dgPersonSettings.Visible                  = true;
            dgPersonSettings.ItemType                 = "Person Setting";
            dgPersonSettings.ItemBgColor              = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgPersonSettings.ItemAltBgColor           = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgPersonSettings.ItemMouseOverColor       = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgPersonSettings.AddEnabled               = EditEnabled;
            dgPersonSettings.AddImageUrl              = "~/images/add_personSetting.gif";
            dgPersonSettings.MoveEnabled              = false;
            dgPersonSettings.SourceTableName          = "core_person_setting";
            dgPersonSettings.SourceTableKeyColumnName = "key";
            dgPersonSettings.DeleteEnabled            = EditEnabled;
            dgPersonSettings.EditEnabled              = false;
            dgPersonSettings.MergeEnabled             = false;
            dgPersonSettings.MailEnabled              = false;
            dgPersonSettings.ExportEnabled            = true;
            dgPersonSettings.AllowSorting             = true;
            dgPersonSettings.DataSource               = dt;
            dgPersonSettings.DataBind();

            if (dgPersonSettings.Items.Count > 0)
            {
                dgPersonSettings.Visible = true;
                lbAdd.Visible            = false;
            }
            else
            {
                if (EditEnabled)
                {
                    dgPersonSettings.Visible = false;
                    lbAdd.Visible            = true;
                }
                else
                {
                    pnlPersonSettings.Visible = false;
                }
            }
        }
Пример #5
0
        private void ShowList()
        {
            DataTable DataSource = null;
            //CategoryEnable = (ddlReportCategory.Items.Count > 1);
            //CategoryEnable = false;
            //int listcategoryid = (CategoryEnable ? Int32.Parse(ddlReportCategory.SelectedValue.ToString()) : -1);
            //EditEnabled = CurrentModule.Permissions.Allowed(OperationType.Edit, CurrentUser);
            bool EditEnabled = true;

            //dgKeys.Columns[4].Visible = CategoryEnable;

            //get the DataSource
            //DataSource = new ListData().GetPublicReports(ArenaContext.Current.Organization.OrganizationID, listcategoryid, CurrentPerson.PersonID);
            if (String.IsNullOrEmpty(Request["DoorID"]) && String.IsNullOrEmpty(Request["UserID"]))
            {
                DataSource = new keyData().GetKeys();
            }
            else if (!String.IsNullOrEmpty(Request["DoorID"]) && String.IsNullOrEmpty(Request["UserID"]))
            {
                DataSource = new keyData().GetKeysByDoor(Int32.Parse(Request["DoorID"]));
            }
            else if (String.IsNullOrEmpty(Request["DoorID"]) && !String.IsNullOrEmpty(Request["UserID"]))
            {
                DataSource = new keyData().GetKeysByPerson(Int32.Parse(Request["UserID"]));
            }
            else
            {
                DataSource = new keyData().GetKeysByPersonDoor(Int32.Parse(Request["UserID"]), Int32.Parse(Request["DoorID"]));
            }

            dgKeys.Columns[5].Visible = true;

            dgKeys.Visible            = true;
            dgKeys.ItemType           = "List";
            dgKeys.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgKeys.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgKeys.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgKeys.AddEnabled         = false;
            dgKeys.AddImageUrl        = "~/images/add_list.gif";
            dgKeys.MoveEnabled        = false;
            dgKeys.DeleteEnabled      = EditEnabled;
            dgKeys.EditEnabled        = EditEnabled;
            dgKeys.MergeEnabled       = false;
            dgKeys.MailEnabled        = false;
            dgKeys.ExportEnabled      = false;
            dgKeys.AllowSorting       = true;
            dgKeys.DataSource         = DataSource;
            dgKeys.DataBind();

            dgKeys.Visible = true;
            lbAdd.Visible  = true;
        }
Пример #6
0
        private void ShowList()
        {
            HyperLinkColumn hlc = (HyperLinkColumn)dgList.Columns[2];

            hlc.DataNavigateUrlFormatString = "~/default.aspx?page=" + ApplicantListPageIDSetting + "&guid={0}";

            dgList.Visible            = true;
            dgList.ItemType           = "Job Posting";
            dgList.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgList.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgList.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgList.AddEnabled         = editEnabled;
            dgList.AddImageUrl        = "~/images/add_job.gif";
            dgList.DeleteEnabled      = editEnabled;
            dgList.EditEnabled        = editEnabled;
            dgList.EditOverride       = true;
            dgList.MergeEnabled       = false;
            dgList.MailEnabled        = false;
            dgList.ExportEnabled      = true;
            dgList.AllowSorting       = true;
            dgList.DataSource         = new JobPostingData().GetJobPostingList_DT(cbShowExternal.Checked);
            dgList.DataBind();

            pnlDetails.Visible = false;
            pnlList.Visible    = true;

            if (dgList.Items.Count > 0)
            {
                dgList.Visible = true;
                lbAdd.Visible  = false;
            }
            else
            {
                if (editEnabled)
                {
                    dgList.Visible = false;
                    lbAdd.Visible  = true;
                }
                else
                {
                    pnlList.Visible = false;
                }
            }
        }
Пример #7
0
        private void ShowPledges()
        {
            DataTable DataSource = new PledgeData().GetPledgeListByFundId_DT(fundId, includeNoPledge, minPledgeAmount, maxPledgeAmount, minPledgeComplete, maxPledgeComplete);

            dgPledges.ItemType           = "Pledges";
            dgPledges.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgPledges.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgPledges.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgPledges.AddEnabled         = false;
            dgPledges.MoveEnabled        = false;
            dgPledges.DeleteEnabled      = false;
            dgPledges.EditEnabled        = false;
            dgPledges.MergeEnabled       = true;
            dgPledges.MailEnabled        = false;
            dgPledges.ExportEnabled      = true;
            dgPledges.AllowSorting       = true;
            dgPledges.DataSource         = DataSource;
            dgPledges.DataBind();
        }
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                //
                // Setup the data grid.
                //
                dgNote.ItemType           = "Number";
                dgNote.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
                dgNote.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
                dgNote.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
                dgNote.MoveEnabled        = false;
                dgNote.DeleteEnabled      = true;
                dgNote.EditEnabled        = true;
                dgNote.AllowSorting       = true;

                dgNote_ReBind(null, null);
            }
        }
        void dgTemplateLocations_ReBind(object sender, EventArgs e)
        {
            dgTemplateLocations.EditItemIndex      = -1;
            dgTemplateLocations.SelectedIndex      = -1;
            dgTemplateLocations.AddEnabled         = false;
            dgTemplateLocations.AllowSorting       = false;
            dgTemplateLocations.DeleteEnabled      = false;
            dgTemplateLocations.EditEnabled        = true;
            dgTemplateLocations.ExportEnabled      = true;
            dgTemplateLocations.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgTemplateLocations.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgTemplateLocations.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgTemplateLocations.ItemType           = "Attendance Frequency";
            dgTemplateLocations.MailEnabled        = false;
            dgTemplateLocations.MergeEnabled       = false;
            dgTemplateLocations.MoveEnabled        = false;

            dgTemplateLocations.DataSource = GetOverviewData();
            dgTemplateLocations.DataBind();
        }
Пример #10
0
        private void ShowLeaveHistory()
        {
            pnlLeaveHistory.Visible = true;
            pnlLeaveDetails.Visible = false;

            dgLeaveHistory.Visible            = true;
            dgLeaveHistory.ItemType           = "Leave History";
            dgLeaveHistory.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgLeaveHistory.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgLeaveHistory.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgLeaveHistory.EditEnabled        = _editEnabled;
            dgLeaveHistory.AddEnabled         = _editEnabled;
            dgLeaveHistory.DeleteEnabled      = _editEnabled;
            dgLeaveHistory.EditOverride       = true;
            dgLeaveHistory.MergeEnabled       = false;
            dgLeaveHistory.MailEnabled        = false;
            dgLeaveHistory.ExportEnabled      = _viewEnabled;
            dgLeaveHistory.AllowSorting       = false;
            dgLeaveHistory.DataSource         = _staff.LeaveHistory;
            dgLeaveHistory.DataBind();
        }
Пример #11
0
        public void ShowList()
        {
            bool EditEnabled = CurrentModule.Permissions.Allowed(OperationType.Edit, CurrentUser);

            // Set up the dgPledges DataGrid
            dgPledges.ItemType           = "Pledge";
            dgPledges.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgPledges.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgPledges.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgPledges.AddEnabled         = false;
            dgPledges.DeleteEnabled      = EditEnabled;
            dgPledges.EditEnabled        = EditEnabled;
            dgPledges.MergeEnabled       = false;
            dgPledges.MailEnabled        = false;
            dgPledges.ExportEnabled      = true;

            dgPledges.DataSource = new DataLayer.PledgeData().GetPledgeListByPersonID_DT(person.PersonID);
            dgPledges.DataBind();

            if (EditEnabled)
            {
                pnlAdd.Visible = true;
                FundCollection funds = new FundCollection(CurrentOrganization.OrganizationID, _useShelby);

                ddlFunds.Items.Clear();
                foreach (Fund fund in funds)
                {
                    if (fund.Active && fund.CanPledge)
                    {
                        ddlFunds.Items.Add(new ListItem(fund.FundName, fund.FundId.ToString()));
                    }
                }
            }
            else
            {
                pnlAdd.Visible = false;
            }
        }
Пример #12
0
        private void ShowList()
        {
            pnlList.Visible = true;

            HyperLinkColumn hlc = (HyperLinkColumn)dgApplicants.Columns[3];

            hlc.DataNavigateUrlFormatString = "~/default.aspx?page=" + ApplicantDetailPageIDSetting + "&guid={0}";

            dgApplicants.Visible            = true;
            dgApplicants.ItemType           = "Job Applicant";
            dgApplicants.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgApplicants.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgApplicants.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgApplicants.AddEnabled         = false;
            dgApplicants.EditEnabled        = false;
            dgApplicants.DeleteEnabled      = _editEnabled;
            dgApplicants.EditOverride       = true;
            dgApplicants.MergeEnabled       = false;
            dgApplicants.MailEnabled        = false;
            dgApplicants.ExportEnabled      = true;
            dgApplicants.AllowSorting       = true;
            dgApplicants.DataSource         = new JobApplicantData().GetJobApplicantList_DT(int.Parse(ddlPostings.SelectedValue), cbRejectionSent.Checked, cbReviewed.Checked);
            dgApplicants.DataBind();
        }
Пример #13
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                //
                // Setup the data grid.
                //
                dgAttendance.ItemType           = "Attendance Record";
                dgAttendance.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
                dgAttendance.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
                dgAttendance.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
                dgAttendance.AddEnabled         = false;
                dgAttendance.MoveEnabled        = false;
                dgAttendance.DeleteEnabled      = false;
                dgAttendance.EditEnabled        = false;
                dgAttendance.MergeEnabled       = false;
                dgAttendance.MailEnabled        = false;
                dgAttendance.ExportEnabled      = true;
                dgAttendance.AllowSorting       = true;
                dgAttendance.Columns[5].Visible = (AbilityLevelAttributeIDSetting != "");

                //
                // Turn off either the regular name, or the hyperlink name.
                //
                if (PersonDetailPageID == -1)
                {
                    dgAttendance.Columns[0].Visible = false;
                }
                else
                {
                    dgAttendance.Columns[1].Visible = false;
                }

                //
                // Fill in the filter options.
                //
                OccurrenceTypeGroupCollection otgc = new OccurrenceTypeGroupCollection(CurrentOrganization.OrganizationID);
                foreach (OccurrenceTypeGroup otg in otgc)
                {
                    ddlFilterTypeGroup.Items.Add(new ListItem(otg.GroupName, otg.GroupId.ToString()));
                }
                OccurrenceCollection oc = new OccurrenceCollection(DateTime.Now, DateTime.Now);
                if (this.Request.Params["groupID"] != null)
                {
                    ddlFilterTypeGroup.SelectedValue = this.Request.Params["groupID"];
                }
                else if (DefaultAttendanceGroupIDSetting != "")
                {
                    ddlFilterTypeGroup.SelectedValue = DefaultAttendanceGroupIDSetting.ToString();
                }
                else if (oc.Count > 0)
                {
                    //
                    // Find the first occurrence with an actual location.
                    //
                    foreach (Occurrence o in oc)
                    {
                        if (o.LocationID != -1)
                        {
                            ddlFilterTypeGroup.SelectedValue = new OccurrenceType(o.OccurrenceTypeID).GroupId.ToString();
                            break;
                        }
                    }
                }

                if (ddlFilterTypeGroup.SelectedValue == null || ddlFilterTypeGroup.SelectedValue == "")
                {
                    ddlFilterTypeGroup.SelectedIndex = 0;
                }

                ddlFilterTypeGroup_Changed(null, null);
                btnFilterApply_Click(null, null);
            }
        }
        private void RebindList()
        {
            groupType              = Int32.Parse(ddlGroupType.SelectedValue);
            groupTopic             = Int32.Parse(ddlGroupTopic.SelectedValue);
            groupMeetingDay1       = Int32.Parse(ddlDayOfWeek.SelectedValue);
            groupMeetingDay2       = Int32.Parse(ddlDayOfWeek2.SelectedValue);
            groupAgeGroup          = Int32.Parse(ddlGroupAge.SelectedValue);
            groupMaritalPreference = Int32.Parse(ddlMaritalPreference.SelectedValue);
            groupSearchText        = tbSearch.Text;
            groupAreaId            = Int32.Parse(ddlAreas.SelectedValue);
            groupAddress           = new Address(tbAddress.Text, string.Empty, tbCity.Text, tbState.Text, tbZip.Text);

            if (tbMiles.Text.Length > 0)
            {
                try { groupDistance = Int32.Parse(tbMiles.Text); }
                catch { }
            }

            //char[] chArr = new char[] { ',' };
            //testDataGrid.DataSource = new GroupData().GetGroupsWithLocator(groupAddress.XAxis, groupAddress.YAxis, groupAddress.ZAxis, CategoryID, groupTopic, _useGroupType, groupType, groupMeetingDay1, groupMeetingDay2, groupAgeGroup, groupMaritalPreference, groupDistance, groupAreaId, groupSearchText.Split(chArr), Int32.Parse(LimitSearchResultsSetting)); //KM-edit; Removed ", true, true, Arena.Core.ArenaContext.Current.Organization.OrganizationID);" from method. There were too many items and these seemed extraneous.
            //testDataGrid.DataBind();



            dgResults.Columns[10].HeaderText = TypeCaption;              //KM-edit; change Columns[9] to Columns[10]
            dgResults.Columns[7].HeaderText  = MeetingDayCaption;
            dgResults.Columns[8].HeaderText  = MeetingStartTimeCaption;  //KM-add
            dgResults.Columns[11].HeaderText = AgeGroupCaption;          //KM-edit; change Columns[10] to Columns[11]
            dgResults.Columns[13].HeaderText = TopicCaption;             //KM-edit; change Columns[12] to Columns[13]
            dgResults.Columns[12].HeaderText = MaritalPreferenceCaption; //KM-edit; change Columns[11] to Columns[12]
            dgResults.Columns[14].HeaderText = DescriptionCaption;       //KM-edit; change Columns[13] to Columns[14]
            dgResults.Columns[6].HeaderText  = LeaderCaption;
            char[] chArr = new char[] { ',' };
            dgResults.DataSource         = new GroupData().GetGroupsWithLocator(groupAddress.XAxis, groupAddress.YAxis, groupAddress.ZAxis, CategoryID, groupTopic, _useGroupType, groupType, groupMeetingDay1, groupMeetingDay2, groupAgeGroup, groupMaritalPreference, groupDistance, groupAreaId, groupSearchText.Split(chArr), Int32.Parse(LimitSearchResultsSetting)); //KM-edit; Removed ", true, true, Arena.Core.ArenaContext.Current.Organization.OrganizationID);" from method. There were too many items and these seemed extraneous.
            dgResults.ItemType           = Arena.Utility.ArenaTextTools.Pluralize(Itemtype);
            dgResults.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
            dgResults.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
            dgResults.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
            dgResults.AddEnabled         = false;
            dgResults.EditEnabled        = false;
            dgResults.MergeEnabled       = false;
            dgResults.MoveEnabled        = false;
            dgResults.DeleteEnabled      = false;
            dgResults.AllowPaging        = true;
            dgResults.AllowSorting       = true;
            dgResults.ExportEnabled      = false;
            dgResults.Columns[4].Visible = Convert.ToBoolean(ShowProximitySetting);
            dgResults.Columns[5].Visible = Convert.ToBoolean(DisplayAreaColumnSetting);    //KM-add; sets the display of the area column
            dgResults.Columns[9].Visible = Convert.ToBoolean(DisplayMembersColumnSetting); //KM-add; sets the display of the member count column
            dgResults.DataBind();

            if (dgResults.Items.Count <= 0)
            {
                dgResults.Visible    = false;
                textpart.Visible     = false;
                lblNoResults.Visible = true;
            }
            else
            {
                dgResults.Visible    = true;
                textpart.Visible     = true;
                lblNoResults.Visible = false;
            }
        }
Пример #15
0
        private void Page_Load(object sender, System.EventArgs e)
        {
            if (!IsPostBack)
            {
                //
                // Setup the data grid.
                //
                dgOccurrence.ItemType           = "Occurrence";
                dgOccurrence.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
                dgOccurrence.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
                dgOccurrence.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
                dgOccurrence.AddEnabled         = false;
                dgOccurrence.MoveEnabled        = false;
                dgOccurrence.DeleteEnabled      = false;
                dgOccurrence.EditEnabled        = false;
                dgOccurrence.MergeEnabled       = false;
                dgOccurrence.MailEnabled        = false;
                dgOccurrence.ExportEnabled      = true;
                dgOccurrence.AllowSorting       = true;
                dgOccurrence.Columns[kOccurrenceNameColumn].Visible     = (AttendanceDetailPageID == -1);
                dgOccurrence.Columns[kOccurrenceNameLinkColumn].Visible = (AttendanceDetailPageID != -1);
                dgOccurrence.Columns[kOccurrenceTypeColumn].Visible     = (AttendanceDetailPageID == -1);
                dgOccurrence.Columns[kOccurrenceTypeLinkColumn].Visible = (AttendanceDetailPageID != -1);

                //
                // Setup the data grid.
                //
                dgLocation.ItemType           = "Location";
                dgLocation.ItemBgColor        = CurrentPortalPage.Setting("ItemBgColor", string.Empty, false);
                dgLocation.ItemAltBgColor     = CurrentPortalPage.Setting("ItemAltBgColor", string.Empty, false);
                dgLocation.ItemMouseOverColor = CurrentPortalPage.Setting("ItemMouseOverColor", string.Empty, false);
                dgLocation.AddEnabled         = false;
                dgLocation.MoveEnabled        = false;
                dgLocation.DeleteEnabled      = false;
                dgLocation.EditEnabled        = false;
                dgLocation.MergeEnabled       = false;
                dgLocation.MailEnabled        = false;
                dgLocation.ExportEnabled      = true;
                dgLocation.AllowSorting       = true;
                dgLocation.Columns[kLocationLocationColumn].Visible     = (AttendanceDetailPageID == -1);
                dgLocation.Columns[kLocationLocationLinkColumn].Visible = (AttendanceDetailPageID != -1);

                //
                // Fill in the filter options.
                //
                OccurrenceTypeGroupCollection otgc = new OccurrenceTypeGroupCollection(CurrentOrganization.OrganizationID);
                foreach (OccurrenceTypeGroup otg in otgc)
                {
                    ddlFilterTypeGroup.Items.Add(new ListItem(otg.GroupName, otg.GroupId.ToString()));
                }
                OccurrenceCollection oc = new OccurrenceCollection(DateTime.Now, DateTime.Now);
                if (DefaultAttendanceGroupIDSetting != "")
                {
                    ddlFilterTypeGroup.SelectedValue = DefaultAttendanceGroupIDSetting.ToString();
                }
                else if (oc.Count > 0)
                {
                    //
                    // Find the first occurrence with an actual location.
                    //
                    foreach (Occurrence o in oc)
                    {
                        if (o.LocationID != -1)
                        {
                            ddlFilterTypeGroup.SelectedValue = new OccurrenceType(o.OccurrenceTypeID).GroupId.ToString();
                            break;
                        }
                    }
                }

                if (ddlFilterTypeGroup.SelectedValue == null || ddlFilterTypeGroup.SelectedValue == "")
                {
                    ddlFilterTypeGroup.SelectedIndex = 0;
                }

                ddlFilterTypeGroup_Changed(null, null);
                btnFilterApply_Click(null, null);

                //
                // Setup options on the finalize close button.
                //
                lbCloseFinish.Style.Add("text-decoration", "none");
                lbCloseFinish.Attributes.Add("onmouseover", "this.style.textDecoration='underline';");
                lbCloseFinish.Attributes.Add("onmouseout", "this.style.textDecoration='none';");
            }

            dgClose_Bind();
        }