public KefWebDataContainer KefCategoryOfKefWebDataSelectByIsActive(string KefCategoryRef, DBInt IsActive) { TraceCallEnterEvent.Raise(); try { KefWebDataContainer result; DataSet entitySet = m_DataContext.ndihdKefCategoryOfKefWebDataSelectByIsActive(KefCategoryRef, IsActive); result = new KefWebDataContainer(entitySet.Tables[0]); TraceCallReturnEvent.Raise(); return result; } catch (Exception ex) { ExceptionManager.Publish(ex); TraceCallReturnEvent.Raise(false); throw; } }
public void MoveUp(string ID) { TraceCallEnterEvent.Raise(); try { //lekérdezzük a kapott ID - hoz tartozó KefWebData -t KefWebData link = KefWebDataSelect(new Guid(ID)); //logikai ellenörzés - megnézzük hogy a LINKEK kategóriához tartozik if (link.KefCategoryRef.ToString().Trim() == "LINKEK") { //megnézzük hogy van e nagyobb index DataSet entitySet = m_DataContext.ndihdKefWebDataSelectByRank(link.LinkRank + 1, "LINKEK"); KefWebDataContainer contLink = new KefWebDataContainer(entitySet.Tables[0]); //ha van ... csökkentjük az indexeiket ... a kapott ID -ét pedig megnöveljük if (contLink.AllCount > 0) { m_DataContext.BeginNestedTran(); try { foreach (KefWebData item in contLink.All) { item.LinkRank--; base.KefWebDataUpdate(item); } link.LinkRank++; base.KefWebDataUpdate(link); m_DataContext.CommitNested(); } catch { m_DataContext.RollbackNested(); throw; } } } TraceCallReturnEvent.Raise(); } catch (Exception ex) { ExceptionManager.Publish(ex); TraceCallReturnEvent.Raise(false); throw; } }
private void FillListView() { try { lvRank.Items.Clear(); IKefWebDataService srvKefWebData = ServiceFactory.GetKefWebDataService(); DBInt filterOnIsActive; if (CurrentID == DBGuid.Null || CurrentID.IsNull) { filterOnIsActive = 1; } else { if (m_CurrentKefWebData == null) { m_CurrentKefWebData = srvKefWebData.KefWebDataSelect(CurrentID); } if (m_CurrentKefWebData != null) { filterOnIsActive = Convert.ToInt32(m_CurrentKefWebData.IsActive); } else { filterOnIsActive = 1; } } m_CurrentKefWebDataContainer = srvKefWebData.KefCategoryOfKefWebDataSelectByIsActive("AKTUALIS ", 1); foreach (KefWebData item in m_CurrentKefWebDataContainer.Current) { string uid = item.ID.ToString(); string[] subitem = { uid, item.Title, item.Description, item.LinkRank.ToString() }; ListViewItem litem = new ListViewItem(subitem); lvRank.Items.Add(litem); lvRank.Sorting = SortOrder.Ascending; } lvRank.ListViewItemSorter = new ListViewItemComparer(3, lvRank.Sorting, true); } catch (Exception ex) { // --- Log exception ExceptionManager.Publish(ex); // --- Display Exception ErrorHandler.DisplayError("Nem várt hiba a lista frissítése során.", ex); } }
public virtual KefWebDataContainer SelectChildrenByKefCategoryOfKefWebData(DBString IDVal) { TraceCallEnterEvent.Raise(); try { KefWebDataContainer result; DataSet entitySet = m_DataContext.ndihdKefCategoryOfKefWebDataSelectBy(IDVal); result = new KefWebDataContainer(entitySet.Tables[0]); TraceCallReturnEvent.Raise(); return result; } catch (Exception ex) { ExceptionManager.Publish(ex); TraceCallReturnEvent.Raise(false); throw; } }
public virtual KefWebDataContainer KefWebDataSelectAll() { TraceCallEnterEvent.Raise(); try { KefWebDataContainer result; DataSet entitySet = m_DataContext.ndihdKefWebDataSelectAll(); result = new KefWebDataContainer(entitySet.Tables[0]); TraceCallReturnEvent.Raise(); return result; } catch (Exception ex) { ExceptionManager.Publish(ex); TraceCallReturnEvent.Raise(false); throw; } }