コード例 #1
0
 public ProgramContainer ProgramSelectByPartnerOrganisation(DBGuid OrganisationID)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     ProgramContainer result;
     DataSet entitySet = m_DataContext.ndihdProgramSelectByPartnerOrganisation(OrganisationID);
     result = new ProgramContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
コード例 #2
0
 public virtual ProgramContainer ProgramSelectAll()
 {
     TraceCallEnterEvent.Raise();
       try
       {
     ProgramContainer result;
     DataSet entitySet = m_DataContext.ndihdProgramSelectAll();
     result = new ProgramContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
コード例 #3
0
 public virtual ProgramContainer SelectChildrenByProgramOfOrganisation(DBGuid IDVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     ProgramContainer result;
     DataSet entitySet = m_DataContext.ndihdProgramOfOrganisationSelectBy(IDVal);
     result = new ProgramContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
コード例 #4
0
        /// <summary>
        /// Shows the own grid.
        /// </summary>
        /// <param name="dataGrid">The data grid.</param>
        /// <param name="selected">The selected.</param>
        /// <param name="notFound">The not found.</param>
        protected void ShowOwnGrid(DataGrid dataGrid, ProgramContainer selected, Panel notFound)
        {
            dataGrid.PageSize = Helpers.GetPageSize("PageSize.ProgramList");

              if (selected.AllCount > 0)
              {
            dataGrid.Visible = true;
            notFound.Visible = false;
              }
              else
              {
            dataGrid.Visible = false;
            notFound.Visible = true;
              }

              ArrayList sortableList = selected.All.SortBy("Name", true);

              // Bind list to datagrid control
              dataGrid.DataSource = sortableList;
              dataGrid.DataBind();
        }
コード例 #5
0
 public virtual ProgramContainer SelectChildrenByCategoryOfProgram(DBString IdVal)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     ProgramContainer result;
     DataSet entitySet = m_DataContext.ndihdCategoryOfProgramSelectBy(IdVal);
     result = new ProgramContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
コード例 #6
0
        public ProgramContainer ProgramSelectFreetext(Program filter)
        {
            TraceCallEnterEvent.Raise();
              try
              {
            if (filter.FilterOnFreetext.Length == 0)
              throw new ApplicationException("Nincs megadva keresési feltétel.");

            ProgramContainer result;
            DataSet entitySet = m_DataContext.ndihdProgramSelectFreeText(
              filter.FilterOnFreetext,
              filter.ProgramCategoryRef,
              filter.FilterOnPublicityLevel,
              filter.FilterOnIsActive);
            result = new ProgramContainer(entitySet.Tables[0]);
            TraceCallReturnEvent.Raise();
            return result;
              }
              catch (Exception ex)
              {
            ExceptionManager.Publish(ex);
            TraceCallReturnEvent.Raise(false);
            throw;
              }
        }
コード例 #7
0
 public ProgramContainer ProgramSelectFiltered(Program filter)
 {
     TraceCallEnterEvent.Raise();
       try
       {
     ProgramContainer result;
     DataSet entitySet = m_DataContext.ndihdProgramSelectFiltered(
       filter.Name,
       filter.OrganisationRef,
       filter.ProgramCategoryRef,
       filter.FilterOnIsActive);
     result = new ProgramContainer(entitySet.Tables[0]);
     TraceCallReturnEvent.Raise();
     return result;
       }
       catch (Exception ex)
       {
     ExceptionManager.Publish(ex);
     TraceCallReturnEvent.Raise(false);
     throw;
       }
 }
コード例 #8
0
        public ProgramContainer ProgramSelectByQuestionForm(QuestionForm filter)
        {
            TraceCallEnterEvent.Raise();
              try
              {
            string answers = "";
            if (filter.Details.AllCount == 0)
              throw new ApplicationException("Legalább egy keresési feltételt meg kell adni.");

            foreach (QuestionFormDetail detail in filter.Details.All)
            {
              if (answers.Length > 0)
              {
            answers += " and ";
              }
              answers += " [cTemplateDetailRef] = '" + detail.TemplateDetailRef + "' ";
              string ans = detail.Answer;
              ans = ans.Replace("*", "%");
              ans = ans.Replace("?", "_");

              answers += " and [cAnswer] like '" + ans + "' ";
            }

            ProgramContainer result;
            DataSet entitySet = m_DataContext.ndihdProgramSelectByQuestionForm(
              filter.TemplateRef,
              answers);
            result = new ProgramContainer(entitySet.Tables[0]);
            TraceCallReturnEvent.Raise();
            return result;
              }
              catch (Exception ex)
              {
            ExceptionManager.Publish(ex);
            TraceCallReturnEvent.Raise(false);
            throw;
              }
        }
コード例 #9
0
        public ProgramContainer ProgramSelectByKeyword(Program filter)
        {
            TraceCallEnterEvent.Raise();
              try
              {
            // check required fields:
            if (filter.FilterOnKeyword1.Length == 0)
              throw new ArgumentNullException("filter.FilterOnKeyword1", "Nincs kulcsszó megadva.");

            // kulcsszó létezik-e?
            ThesaurusService thesSrv = new ThesaurusService(m_DataContext);
            if (!thesSrv.KeywordCheck(filter.FilterOnKeyword1))
              throw new ApplicationException("A megadott kifejezés (" + filter.FilterOnKeyword1 +
                                         ") nem szerepel a kulcsszavak között.");

            if (!filter.FilterOnKeyword2.IsNull && !thesSrv.KeywordCheck(filter.FilterOnKeyword2))
              throw new ApplicationException("A megadott kifejezés (" + filter.FilterOnKeyword2 +
                                         ") nem szerepel a kulcsszavak között.");
            if (!filter.FilterOnKeyword3.IsNull && !thesSrv.KeywordCheck(filter.FilterOnKeyword3))
              throw new ApplicationException("A megadott kifejezés (" + filter.FilterOnKeyword3 +
                                         ") nem szerepel a kulcsszavak között.");
            if (!filter.FilterOnKeyword4.IsNull && !thesSrv.KeywordCheck(filter.FilterOnKeyword4))
              throw new ApplicationException("A megadott kifejezés (" + filter.FilterOnKeyword4 +
                                         ") nem szerepel a kulcsszavak között.");

            ProgramContainer result;
            DataSet entitySet = m_DataContext.ndihdProgramSelectByKeyword(
              filter.FilterOnKeyword1,
              filter.FilterOnKeywordRelation1,
              filter.FilterOnKeyword2,
              filter.FilterOnKeywordRelation2,
              filter.FilterOnKeyword3,
              filter.FilterOnKeywordRelation3,
              filter.FilterOnKeyword4);
            result = new ProgramContainer(entitySet.Tables[0]);
            TraceCallReturnEvent.Raise();
            return result;
              }
              catch (Exception ex)
              {
            ExceptionManager.Publish(ex);
            TraceCallReturnEvent.Raise(false);
            throw;
              }
        }