Beispiel #1
0
        void ChangeLogicType(QueryLogicType newType)
        {
            if (newType == Query.LogicType)
            {
                return;
            }

            if (Query.LogicType == QueryLogicType.Complex)             // turning off complex logic
            {
                string logicTypeString = "And";
                if (newType == QueryLogicType.Or)
                {
                    logicTypeString = "Or";
                }
                if (XtraMessageBox.Show(
                        "Switching from \"Advanced\" to \"" + logicTypeString + "\" logic may cause the loss of some criteria logic.\n" +
                        "Do you want to continue?",
                        UmlautMobius.String, MessageBoxButtons.YesNo, MessageBoxIcon.Question)
                    != DialogResult.Yes)
                {                 // set back to advanced
                    CtUseComplexLogic.Checked = true;
                    return;
                }

                else                 // switching to And or Or logic
                {
                    if (newType == QueryLogicType.And)
                    {
                        MqlUtil.ConvertComplexCriteriaToQueryColumnCriteria(Query, QueryLogicType.And);
                    }

                    else
                    {
                        MqlUtil.ConvertComplexCriteriaToQueryColumnCriteria(Query, QueryLogicType.Or);
                    }
                }
            }

            else if (newType == QueryLogicType.Complex)             // turning on complex logic
            {
                MqlUtil.ConvertQueryColumnCriteriaToComplexCriteria(Query);
                Query.ClearAllQueryColumnCriteria();
            }

            Query.LogicType = newType;
            Render();
            return;
        }
Beispiel #2
0
        /// <summary>
        /// Add type of logic
        /// </summary>
        /// <param name="logicType"></param>

        void AddCriteriaLogicPanel(
            QueryLogicType logicType)
        {
            if (logicType == QueryLogicType.And)
            {
                CtUseAndLogic.Checked = true;
            }
            else if (logicType == QueryLogicType.Or)
            {
                CtUseOrLogic.Checked = true;
            }
            else
            {
                CtUseComplexLogic.Checked = true;
            }

            CtLogicPanel.Location = new System.Drawing.Point(0, CriteriaTabYPos + 6);
            ScrollablePanel.Controls.Add(CtLogicPanel);

            CriteriaTabYPos += CtLogicPanel.Height;
            return;
        }
Beispiel #3
0
 public IQueryLogicResolver getQueryLogicResolver(QueryLogicType QueryLogicType)
 {
     throw new System.NotImplementedException();
 }