private static void doRec(Int64 parentID) { String sortExpression = SqlExpressionBuilder.PrepareSortExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_SequenceNumber, SQLSortOrderType.Assending); String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ParentASSiteMapNodeID, parentID.ToString(), SQLMatchType.Equal); IList <ASSiteMapNode_DetailedEntity> aSSiteMapNode_DetailedEntityList = FCCASSiteMapNode_Detailed.GetFacadeCreate().GetIL(1, 1000000, sortExpression, filterExpression); if (aSSiteMapNode_DetailedEntityList != null && aSSiteMapNode_DetailedEntityList.Count > 0) { foreach (ASSiteMapNode_DetailedEntity aSSiteMapNode_DetailedEntity in aSSiteMapNode_DetailedEntityList) { doRec(aSSiteMapNode_DetailedEntity.ASSiteMapNodeID); Boolean hasPermission = false; if (aSSiteMapNode_DetailedEntity.ASPhysicalSiteMapID == null) { hasPermission = PermissionHelper.IsUerHasPermission(aSSiteMapNode_DetailedEntity.UniqueKey); } else if (aSSiteMapNode_DetailedEntity.ASPhysicalSiteMapID > 0) { hasPermission = PermissionHelper.IsUerHasPermission(aSSiteMapNode_DetailedEntity.ASPhysicalSiteMapUniqueKey); } if (hasPermission == true) { list.Add(aSSiteMapNode_DetailedEntity); } } } }
public IList <OTSchedule_DetailedEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression, String filterExpression) { IList <OTSchedule_DetailedEntity> oTSchedule_DetailedEntityList = new List <OTSchedule_DetailedEntity>(); try { if (String.IsNullOrEmpty(sortExpression)) { sortExpression = SqlExpressionBuilder.PrepareSortExpression("OTSchedule." + OTScheduleEntity.FLD_NAME_ScheduleID, SQLSortOrderType.Decending); } Int32 currentPage = Convert.ToInt32(startRowIndex / pageSize) + 1; //startRowIndex = Convert.ToInt32( startRowIndex / pageSize) + 1; if (pageSize == -1) { pageSize = 1000000000; } oTSchedule_DetailedEntityList = FCCOTSchedule_Detailed.GetFacadeCreate().GetIL(pageSize, currentPage, sortExpression, filterExpression); if (oTSchedule_DetailedEntityList != null && oTSchedule_DetailedEntityList.Count > 0) { totalRowCount = oTSchedule_DetailedEntityList[0].TotalRowCount; } } catch (Exception ex) { } return(oTSchedule_DetailedEntityList ?? new List <OTSchedule_DetailedEntity>()); }
private static void CreateMenuSourceForLogedInUser() { try { list = new List <ASSiteMapNode_DetailedEntity>(); String sortExpression = SqlExpressionBuilder.PrepareSortExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_SequenceNumber, SQLSortOrderType.Assending); String filterExpression1 = "ASSiteMapNode." + SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ASSiteMapID, SecurityConstants.ASSiteMap.MASTER_NAVIGATION_MENU.ToString(), SQLMatchType.Equal); String filterExpression2 = SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ParentASSiteMapNodeID, String.Empty, SQLMatchType.IsNull); String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(filterExpression1, SQLJoinType.AND, filterExpression2); IList <ASSiteMapNode_DetailedEntity> aSSiteMapNode_DetailedEntityList = FCCASSiteMapNode_Detailed.GetFacadeCreate().GetIL(1, 1000000, sortExpression, filterExpression); if (aSSiteMapNode_DetailedEntityList != null && aSSiteMapNode_DetailedEntityList.Count > 0) { foreach (ASSiteMapNode_DetailedEntity aSSiteMapNode_DetailedEntity in aSSiteMapNode_DetailedEntityList) { AddMenuNode(aSSiteMapNode_DetailedEntity.ASSiteMapNodeID); break; } } System.Web.HttpContext.Current.Session[SessionConstants.MASTER_NAVIGATION_MENU_ITEMS] = list; } catch (Exception ex) { } }
private void BindPRMItemBrandMapList() { String sortExpression = SqlExpressionBuilder.PrepareSortExpression(MDBrandEntity.FLD_NAME_BrandName, SQLSortOrderType.Assending); IList <MDBrandEntity> ItemBrandList = FCCMDBrand.GetFacadeCreate().GetIL(null, null, sortExpression, String.Empty, DatabaseOperationType.LoadWithSortExpression); _CurrentItemBrandList = ItemBrandList; chbxItemBrand.DataSource = ItemBrandList; chbxItemBrand.DataTextField = "BrandName"; chbxItemBrand.DataValueField = "BrandID"; chbxItemBrand.DataBind(); }
private void BindPRMItemBrandMapList() { String se = SqlExpressionBuilder.PrepareSortExpression(CRMMDBuyerInterestedRoomCategoryEntity.FLD_NAME_Name, SQLSortOrderType.Assending); IList <CRMMDBuyerInterestedRoomCategoryEntity> buyerInterestedRoomList = FCCCRMMDBuyerInterestedRoomCategory.GetFacadeCreate().GetIL(null, null, se, String.Empty, DatabaseOperationType.LoadWithSortExpression); _CurrentCRMMDBuyerInterestedRoomCategoryList = buyerInterestedRoomList; chbxBuyerInterestedRoom.DataSource = buyerInterestedRoomList; chbxBuyerInterestedRoom.DataTextField = "Name"; chbxBuyerInterestedRoom.DataValueField = "BuyerInterestedRoomCategoryID"; chbxBuyerInterestedRoom.DataBind(); }
protected void odsAPPanelMember_Selecting(object sender, ObjectDataSourceSelectingEventArgs e) { Int64 aPPanelID = 0; Int64.TryParse(ddlAPPanelID.SelectedValue, out aPPanelID); String fe = SqlExpressionBuilder.PrepareFilterExpression("APPanelMember." + APPanelMember_CustomEntity.FLD_NAME_APPanelID, aPPanelID.ToString(), SQLMatchType.Equal); //String se = SqlExpressionBuilder.PrepareSortExpression("APPanelMember." + APPanelMember_CustomEntity.FLD_NAME_SequenceNo, SQLSortOrderType.Assending); String se = SqlExpressionBuilder.PrepareSortExpression(APPanelMember_CustomEntity.FLD_NAME_SequenceNo, SQLSortOrderType.Assending); e.InputParameters["sortExpression"] = se; e.InputParameters["filterExpression"] = fe; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { lblTotalUser.Text = "0"; String sortExpression = SqlExpressionBuilder.PrepareSortExpression(UserList_DetailedEntity.FLD_NAME_UserName, SQLSortOrderType.Assending); lblTotalUser.Text = FCCUserList_Detailed.GetFacadeCreate().GetIL(1000000, 1, sortExpression, String.Empty).Count.ToString(); } catch (Exception ex) { } } }
private void AddChildNodeToMenu(SiteMapNode currentNode, Int64 parentID) { //String ss = "a"; //File.AppendAllText("C://Test//test.txt", ss); String sortExpression = SqlExpressionBuilder.PrepareSortExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_SequenceNumber, SQLSortOrderType.Assending); String filterExpression1 = "ASSiteMapNode." + SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ASSiteMapID, aSSiteMapID.ToString(), SQLMatchType.Equal); String filterExpression2 = SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ParentASSiteMapNodeID, parentID.ToString(), SQLMatchType.Equal); String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(filterExpression1, SQLJoinType.AND, filterExpression2); IList <ASSiteMapNode_DetailedEntity> aSSiteMapNode_DetailedEntityList = FCCASSiteMapNode_Detailed.GetFacadeCreate().GetIL(1, 1000000, sortExpression, filterExpression); if (aSSiteMapNode_DetailedEntityList != null && aSSiteMapNode_DetailedEntityList.Count > 0) { foreach (ASSiteMapNode_DetailedEntity aSSiteMapNode_DetailedEntity in aSSiteMapNode_DetailedEntityList) { Boolean hasPermission = false; if (aSSiteMapNode_DetailedEntity.ASPhysicalSiteMapID == null) { hasPermission = PermissionHelper.IsUerHasPermission(aSSiteMapNode_DetailedEntity.UniqueKey); } else if (aSSiteMapNode_DetailedEntity.ASPhysicalSiteMapID > 0) { hasPermission = PermissionHelper.IsUerHasPermission(aSSiteMapNode_DetailedEntity.ASPhysicalSiteMapUniqueKey); } if (hasPermission == true) { SiteMapNode siteMapNode = new SiteMapNode(this, aSSiteMapNode_DetailedEntity.ASSiteMapNodeID.ToString()); siteMapNode.Title = aSSiteMapNode_DetailedEntity.MenuTitle; siteMapNode.Url = aSSiteMapNode_DetailedEntity.NavigationURL; siteMapNode.Description = aSSiteMapNode_DetailedEntity.ToolTip; AddNode(siteMapNode, currentNode); AddChildNodeToMenu(siteMapNode, aSSiteMapNode_DetailedEntity.ASSiteMapNodeID); } } } }
public override SiteMapNode BuildSiteMap() { lock (_siteMapLock) { if (rootSiteMapNode != null) { return(rootSiteMapNode); } base.Clear(); String sortExpression = SqlExpressionBuilder.PrepareSortExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_SequenceNumber, SQLSortOrderType.Assending); String filterExpression1 = "ASSiteMapNode." + SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ASSiteMapID, aSSiteMapID.ToString(), SQLMatchType.Equal); String filterExpression2 = SqlExpressionBuilder.PrepareFilterExpression(ASSiteMapNode_DetailedEntity.FLD_NAME_ParentASSiteMapNodeID, String.Empty, SQLMatchType.IsNull); String filterExpression = SqlExpressionBuilder.PrepareFilterExpression(filterExpression1, SQLJoinType.AND, filterExpression2); IList <ASSiteMapNode_DetailedEntity> aSSiteMapNode_DetailedEntityList = FCCASSiteMapNode_Detailed.GetFacadeCreate().GetIL(1, 1000000, sortExpression, filterExpression); if (aSSiteMapNode_DetailedEntityList != null && aSSiteMapNode_DetailedEntityList.Count > 0) { rootSiteMapNode = new SiteMapNode(this, aSSiteMapNode_DetailedEntityList[0].ASSiteMapNodeID.ToString()); rootSiteMapNode.Title = aSSiteMapNode_DetailedEntityList[0].MenuTitle; rootSiteMapNode.Url = aSSiteMapNode_DetailedEntityList[0].NavigationURL; rootSiteMapNode.Description = aSSiteMapNode_DetailedEntityList[0].ToolTip; AddChildNodeToMenu(rootSiteMapNode, aSSiteMapNode_DetailedEntityList[0].ASSiteMapNodeID); if (rootSiteMapNode.ChildNodes.Count > 0) { AddNode(rootSiteMapNode); } else { rootSiteMapNode = null; } } return(rootSiteMapNode); } }