protected void odsCMNEvent_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { String fe1 = SqlExpressionBuilder.PrepareFilterExpression(CMNEventEntity.FLD_NAME_EventIdentityCategoryID, OverviewEventIdentityCategoryID.ToString(), SQLMatchType.Equal); String fe2 = SqlExpressionBuilder.PrepareFilterExpression(CMNEventEntity.FLD_NAME_CreatedByMemberID, CurrentMember.MemberID.ToString(), SQLMatchType.Equal); String fe = SqlExpressionBuilder.PrepareFilterExpression(fe1, SQLJoinType.AND, fe2); String fe_invitation = SqlExpressionBuilder.PrepareFilterExpression(CMNEventInvitationInformationEntity.FLD_NAME_InitationGivenToMemberID, CurrentMember.MemberID.ToString(), SQLMatchType.Equal); IList <CMNEventInvitationInformationEntity> lstCMNEventInvitationInformationEntity = FCCCMNEventInvitationInformation.GetFacadeCreate().GetIL(null, null, String.Empty, fe_invitation, DatabaseOperationType.LoadWithFilterExpression); if (lstCMNEventInvitationInformationEntity != null && lstCMNEventInvitationInformationEntity.Count > 0) { String compositeEventID = String.Empty; foreach (CMNEventInvitationInformationEntity ent in lstCMNEventInvitationInformationEntity) { compositeEventID += ent.EventID + ","; } compositeEventID = compositeEventID.Substring(0, compositeEventID.Length - 1); String fe_compsite = "EventID In(" + compositeEventID + ")"; fe = SqlExpressionBuilder.PrepareFilterExpression(fe, SQLJoinType.AND, fe_compsite); } if (chbxFilter.Checked) { String fe3 = SqlExpressionBuilder.PrepareFilterExpression(CMNEventEntity.FLD_NAME_Title, txtSearchText.Text.ToString(), SQLMatchType.LikeWithBothMath); String fe4 = SqlExpressionBuilder.PrepareFilterExpression(CMNEventEntity.FLD_NAME_EventReferenceNo, txtSearchText.Text.ToString(), SQLMatchType.LikeWithBothMath); String fe5 = SqlExpressionBuilder.PrepareFilterExpression(fe3, SQLJoinType.OR, fe4); fe = SqlExpressionBuilder.PrepareFilterExpression(fe, SQLJoinType.AND, fe5); } e.InputParameters["filterExpression"] = fe; }
private void PrepareInitialView() { BuildDropDownList(); txtEventReferenceNo.Text = MasterDataConstants.AutoAssigned.DEFAULT_AUTO_ASSIGNED; txtTitle.Text = String.Empty; txtDetails.Text = String.Empty; txtLocation.Text = String.Empty; txtWebsiteURL.Text = String.Empty; txtTicketSellerURL.Text = String.Empty; txtYoutubeURL.Text = String.Empty; txtTransitAndParkingInformation.Text = String.Empty; txtDuration.Text = String.Empty; txtExpectedStartDate.Text = System.DateTime.Now.ToString("MM/dd/yyyy hh:mm"); txtExpectedEndDate.Text = System.DateTime.Now.AddHours(1).ToString("MM/dd/yyyy hh:mm"); txtActualStartDate.Text = String.Empty; txtActualEndDate.Text = String.Empty; chkIsAllDay.Checked = false; txtNotifyBeforeMin.Text = String.Empty; txtRemarks.Text = String.Empty; if (OverviewEventID > 0) { _EventID = OverviewEventID; } hypEventSchedule.NavigateUrl = UrlHelper.BuildSecureUrl("~/Common/CMNEventSchedule.aspx", string.Empty, UrlConstants.OVERVIEW_EVENT_IDENTITY_CATEGORY_ID, OverviewEventIdentityCategoryID.ToString()).ToString(); hypEventSchedule.Target = "_blank"; btnSubmit.Text = "Add"; btnAddNew.Visible = false; }