public void TearDown()
 {
     Criteria criteria1 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "MyShape");
     Shape shape = BORegistry.DataAccessor.BusinessObjectLoader.GetBusinessObject<Shape>(
         criteria1);
     if (shape != null)
     {
         shape.MarkForDelete();
         shape.Save();
     }
     criteria1 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "Circle");
     Criteria criteria2 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "CircleChanged");
     Criteria criteria = new Criteria(criteria1, Criteria.LogicalOp.Or, criteria2);
     CircleNoPrimaryKey circle = BORegistry.DataAccessor.BusinessObjectLoader.GetBusinessObject<CircleNoPrimaryKey>(
         criteria);
     if (circle != null)
     {
         circle.MarkForDelete();
         circle.Save();
     }
     criteria1 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "FilledCircle");
     criteria2 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "FilledCircleChanged");
     criteria = new Criteria(criteria1, Criteria.LogicalOp.Or, criteria2);
     FilledCircleNoPrimaryKey filledCircle = BORegistry.DataAccessor.BusinessObjectLoader.GetBusinessObject<FilledCircleNoPrimaryKey>(
         criteria);
     if (filledCircle == null) return;
     filledCircle.MarkForDelete();
     filledCircle.Save();
 }
        public void TearDown()
        {
            TransactionCommitterDB committer = new TransactionCommitterDB(DatabaseConnection.CurrentConnection);
            Criteria criteria1 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "MyShape");
            Criteria criteria2 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "MyShapeChanged");
            Criteria criteria = new Criteria(criteria1, Criteria.LogicalOp.Or, criteria2);
            BusinessObjectCollection<Shape> shapes = 
                BORegistry.DataAccessor.BusinessObjectLoader.GetBusinessObjectCollection<Shape>(criteria, null);
            while (shapes.Count > 0)
            {
                Shape shape = shapes[0];
                shape.MarkForDelete();
                committer.AddBusinessObject(shape);
            }

            criteria1 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "Circle");
            criteria2 = new Criteria("ShapeName", Criteria.ComparisonOp.Equals, "CircleChanged");
            criteria = new Criteria(criteria1, Criteria.LogicalOp.Or, criteria2);
            BusinessObjectCollection<CircleNoPrimaryKey> circles 
                = BORegistry.DataAccessor.BusinessObjectLoader.GetBusinessObjectCollection
                    <CircleNoPrimaryKey>(criteria, null);
            foreach (CircleNoPrimaryKey circle in circles)

            {
                circle.MarkForDelete();
                committer.AddBusinessObject(circle);
            }
            committer.CommitTransaction();
        }
 public BasicRequestCommand(
     Criteria<FrontControllerRequest> request_criteria,
     ApplicationCommand application_command)
 {
     this.request_specification = request_criteria;
     this.application_command = application_command;
 }
 public ActionResult Edit(long[] ids)
 {
     using (var session = new SessionFactory().OpenSession())
     {
         var model = session.Load<TrainManagementItem>(ids[0]);
         if (model.ExamStatus != null && !model.ExamStatus.Equals(ExamStatusConst.未考试))
         {
             FlashWarn("您已经完成该考试!");
             return Close();
         }
         var q = new Criteria<Exam>(session)
          .AndIn<TrainManagementItem>(m => m.TrainManId, n => n.TrainManId, n => n.Id == ids[0]);
         var exam = q.Load();
         if (exam == null)
         {
             FlashWarn("考试不存在!请联系管理员!");
             return Close();
         }
         var models = session.Find<Question>(m => m.ExamId == exam.Id);
         if (models == null || !models.Any())
         {
             FlashWarn("考试题目未设置!");
             return Close();
         }
         Response.Write(string.Format("<script>window.open('Exam?ids={0}','_blank')</script>", ids[0]));
         return Close();
     }
 }
 public static SelectList AllOrganizationList()
 {
     var q = new Criteria<Organization>();
     var d = q.Find();
     d.Insert(0, new Organization { Id = 0, Name = "全部" });
     return new SelectList(d, "Id", "Name");
 }
 public static SelectList AllSchoolSectionList()
 {
     var q = new Criteria<Department>();
     q.And(m => m.Type.Equals(DeparmentTypeList.Section));
     var d = q.Find();
     d.Insert(0, new Department { Id = 0, Name = "全部" });
     return new SelectList(d, "Id", "Name");
 }
Esempio n. 7
0
 static UserHelper()
 {
     var users = new Criteria<User>().Find();
     foreach (var user in users)
     {
         Maps.Add(user.Name, user.Realname);
     }
 }
 public RoleForViewCustomerInfo()
 {
     var specialRolesSetting = new Criteria<Setting>()
        .Where(m => m.Code.Equals(Setting.RecruitingPlanExportTypeGjg)).Load();
     var specialRoleNames = specialRolesSetting == null ? new string[0] :
         specialRolesSetting.Value.Split(new[] { ',', ' ', ',' }, StringSplitOptions.RemoveEmptyEntries);
     _roleNames = specialRoleNames.ToList();
 }
 /// <summary>
 /// 读取滚动公告
 /// </summary>
 /// <returns></returns>
 public static IList<Notice> GetScrollNotices()
 {
     using (var session = new SessionFactory().OpenSession())
     {
         var today = DateTime.Today;
         var q = new Criteria<Notice>(session).Where(m => m.StopAt >= today);
         return q.Find();
     }
 }
Esempio n. 10
0
        public static string GetName(this string accountNo)
        {
            if (string.IsNullOrEmpty(accountNo)) return null;
            if (Maps.ContainsKey(accountNo)) return Maps[accountNo];

            var user = new Criteria<User>().Where(m => m.Name.Equals(accountNo)).Load();
            if (user == null) return null;
            Maps.Add(accountNo, user.Realname);
            return user.Realname;
        }
 public static SelectList ClassStudentList(long id)
 {
     var q = new Criteria<SchoolStudent>().Where(m => m.ClassId.Equals(id)).Asc(m => m.StudentNo);
     var d = q.Find();
     foreach (var x in d)
     {
         x.StudentName = "[" + x.StudentNo + "]" + x.StudentName;
     }
     return new SelectList(d, "StudentNo", "StudentName");
 }
Esempio n. 12
0
 public void TestCriteria()
 {
     //---------------Set up test pack-------------------
     var selectQuery = new SelectQuery {Source = new Source("bob")};
     //---------------Execute Test ----------------------
     var criteria = new Criteria("test", Criteria.ComparisonOp.Equals, "testValue");
     selectQuery.Criteria = criteria;
     //---------------Test Result -----------------------
     Assert.AreSame(criteria, selectQuery.Criteria);
     //---------------Tear Down -------------------------
 }
Esempio n. 13
0
    protected void Display_View()
    {
        pnl_viewall.Visible = false;
        List<OrderData> orderList = new List<OrderData>();
        List<AddressData> aAddreses = new List<AddressData>();
        List<Ektron.Cms.Commerce.Basket> basketList;

        OrderApi orderApi = new OrderApi();
        BasketApi basketApi = new BasketApi();
        // customer
        cCustomer = CustomerManager.GetItem(this.m_iID);
        m_iCustomerId = cCustomer.Id;
        this.ltr_id.Text = cCustomer.Id.ToString();
        this.ltr_uname.Text = cCustomer.UserName;
        this.ltr_fname.Text = cCustomer.FirstName;
        this.ltr_lname.Text = cCustomer.LastName;

        this.ltr_dname.Text = cCustomer.DisplayName;
        this.ltr_ordertotal.Text = cCustomer.TotalOrders.ToString();
        this.ltr_orderval.Text = defaultCurrency.ISOCurrencySymbol + EkFunctions.FormatCurrency(cCustomer.TotalOrderValue, defaultCurrency.CultureCode);
        this.ltr_pervalue.Text = defaultCurrency.ISOCurrencySymbol + EkFunctions.FormatCurrency(cCustomer.AverageOrderValue, defaultCurrency.CultureCode);
        // customer
        // orders
        Criteria<OrderProperty> orderCriteria = new Criteria<OrderProperty>();
        orderCriteria.AddFilter(OrderProperty.CustomerId, CriteriaFilterOperator.EqualTo, m_iID);
        orderList = orderApi.GetList(orderCriteria);
        if (orderList.Count == 0)
        {
            ltr_orders.Text = this.GetMessage("lbl no orders");
        }
        dg_orders.DataSource = orderList;
        dg_orders.DataBind();
        // orders
        // addresses
        aAddreses = AddressManager.GetList(m_iID);
        if (aAddreses.Count == 0)
        {
            ltr_address.Text = this.GetMessage("lbl no addresses");
        }
        dg_address.DataSource = aAddreses;
        dg_address.DataBind();
        // addresses
        // baskets
        if (this.m_iID > 0)
        {
            basketList = basketApi.GetList(this.m_iID);
            if (basketList.Count == 0)
            {
                ltr_baskets.Text = this.GetMessage("lbl no baskets");
            }
            dg_baskets.DataSource = basketList;
            dg_baskets.DataBind();
        }
    }
Esempio n. 14
0
        private void DoConditionlessQuery(Func<FilterDescriptor<ElasticSearchProject>, BaseFilter> filter)
        {
            var criteria = new Criteria { };
            var s = new SearchDescriptor<ElasticSearchProject>()
                .Strict()
                .From(0)
                .Take(10)
                .Filter(filter);

            this.JsonEquals(s, System.Reflection.MethodInfo.GetCurrentMethod(), "MatchAll");
        }
 public static SelectList DepartmentList()
 {
     var q = new Criteria<SchoolDepartment>();
     var d = q.Find();
     foreach (var item in d)
     {
         item.Name = string.Format("{0} [{1}]", item.Name, item.ShortName);
     }
     d.Insert(0, new SchoolDepartment { Id = 0, Name = "无" });
     return new SelectList(d, "Id", "Name");
 }
Esempio n. 16
0
        public void TestConstructor()
        {
            //-------------Setup Test Pack ------------------
            const string surname = "Surname";
            string surnameValue = TestUtil.GetRandomString();
            Criteria criteria = new Criteria(surname, Criteria.ComparisonOp.Equals, surnameValue);

            //-------------Execute test ---------------------
            CriteriaDB criteriaDB = new CriteriaDB(criteria);
            //-------------Test Result ----------------------
            Assert.AreEqual(criteria, criteriaDB);
        }
Esempio n. 17
0
    public Criteria<OrderProperty> Util_GetDates(Criteria<OrderProperty> orderCriteria)
    {
        string periodText = String.Empty;

        switch (hdn_filter.Value)
        {
            case "#yesterday":
                periodText = GetMessage("lbl yesterday");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.LessThanOrEqualTo, DateTime.Now.Date);
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Date.Subtract(new TimeSpan(1, 0, 0, 0)));
                break;

            case "#thisweek":
                periodText = GetMessage("lbl this week");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Subtract(new TimeSpan(DateTime.Now.DayOfWeek.GetHashCode(), 0, 0, 0)));
                break;

            case "#last7days":
                periodText = GetMessage("lbl last seven days");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Subtract(new TimeSpan(7, 0, 0, 0)));
                break;

            case "#thismonth":
                periodText = GetMessage("lbl this month");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Subtract(new TimeSpan(DateTime.Now.Date.Day, 0, 0, 0)));
                break;

            case "#last30days":
                periodText = GetMessage("lbl last thirty days");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Subtract(new TimeSpan(30, 0, 0, 0)));
                break;

            case "#thisyear":
                periodText = GetMessage("lbl this year");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Subtract(new TimeSpan(DateTime.Now.DayOfYear, 0, 0, 0)));
                break;

            default: // "#today":
                periodText = GetMessage("today");
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Date);
                break;
        }

        SetTitle(GetMessage("lbl top products label"));
        ltr_period.Text = "<a href=\"#periodMenu" + this.ClientID + "\" class=\"commerceperiod" + this.ClientID + " commerceperiodlink\">"
            + periodText + "</a>" + "&#160;&#160;&#160;"
            + GetMessage("lbl quantity") + "&#160;"
            + "<a href=\"#\" class=\"quantitySection" + this.ClientID + " commerceactionlink\" >"
            + _qty.ToString() + "</a>";

        return orderCriteria;
    }
Esempio n. 18
0
        public void TestEquals_Null()
        {
            //---------------Set up test pack-------------------
            DateTime dateTimeValue = DateTime.Now;
            const string datetimePropName = "DateTime";
            Criteria criteria1 = new Criteria(datetimePropName, Criteria.ComparisonOp.GreaterThan, dateTimeValue);

            //---------------Execute Test ----------------------
            bool areEquals = criteria1.Equals(null);
            //---------------Test Result -----------------------
            Assert.IsFalse(areEquals);
            //---------------Tear Down -------------------------
        }
Esempio n. 19
0
 private void MergeCriteriaSource(Criteria criteria)
 {
     if (criteria == null) return;
     if (criteria.IsComposite())
     {
         MergeCriteriaSource(criteria.LeftCriteria);
         MergeCriteriaSource(criteria.RightCriteria);
     }
     else
     {
         this.Source.MergeWith(criteria.Field.Source);
     }
 }
Esempio n. 20
0
        public void TestLeafProperties_AlternateConstructor()
        {
            //-------------Setup Test Pack ------------------
            QueryField field1 = new QueryField("MyField", "MyField", null);
            //-------------Test Pre-conditions --------------

            //-------------Execute test ---------------------
            Criteria criteria = new Criteria(field1, Criteria.ComparisonOp.Equals, "MyValue");

            //-------------Test Result ----------------------
            Assert.AreSame(field1, criteria.Field);
            Assert.AreEqual("MyValue", criteria.FieldValue);
            Assert.AreEqual(Criteria.ComparisonOp.Equals, criteria.ComparisonOperator);
        }
        public ActionResult Create(FormCollection collection)
        {
            var model = new TrainNeed();
            TryUpdateModel(model, collection.ToValueProvider());
            if (!ModelState.IsValid)
            {
                return View(model);
            }
            using (var session = new SessionFactory().OpenSession())
            {

                session.BeginTransaction();
                var dept = new Criteria<Department>(session)
                  .AndIn<User>(m => m.Id, n => n.DepartmentId, m => m.Code.Equals(CurrentAccountNo)).Load();
                var models = session.Find<TrainNeed>(m => !m.IsCollected && m.Status.Equals(TrainNeedStatus.已提交部门负责人) && m.DeptId == dept.Id && m.Type.Equals(TrainNeedType.员工));
                if (models == null || !models.Any())
                {
                    FlashWarn("没有未汇总的需求!");
                    return Close();
                }
                foreach (var trainNeed in models)
                {
                    trainNeed.IsCollected = true;
                }
                model.DeptId = dept != null ? dept.Id : 0;
                model.Dept = dept != null ? dept.Name : null;
                model.IsCollected = false;
                model.CreatedAt = DateTime.Now;
                model.CreatedBy = CurrentAccountNo;
                model.Type = TrainNeedType.部门;
                ViewData.Model = model;
                ViewData["StaffNeeds"] = models;
                var exist = session.Load<TrainNeed>(m => m.Type.Equals(TrainNeedType.部门) && m.DeptId.Equals(model.DeptId) && m.Year.Equals(model.Year));
                if (exist != null)
                {
                    ModelState.AddModelError("Year", "本部门该年度部门培训需求已经存在!");
                    return View(model);
                }
                if (session.Create(model) && session.Update(models))
                {
                    session.Commit();
                    FlashSuccess("创建记录成功!");
                    return Close();
                }
                session.Rollback();
                FlashFailure("创建记录失败!");
                return View();
            }
        }
 public ActionResult QuickSearch(FormCollection collection, uint pagesize = DefaultPageSize, uint pageno = 1)
 {
     var keyword = GetDbQueryPara();
     using (var session = new SessionFactory().OpenSession())
     {
         var q = new Criteria<TrainManagement>(session)
             .Page(pagesize, pageno)
             .Asc(m => m.Id)
             .AddOrder(collection, ViewData)
             //.AndUnless(string.IsNullOrEmpty(keyword), m => m.Name.Include(keyword))
             ;
         var models = q.Find().PartPage(pageno, pagesize, q.Count());
         return View(models);
     }
 }
Esempio n. 23
0
 public void Util_BindData()
 {
     DateTime firstItemDate = DateTime.Now;
     List<List<int>> dataset = new List<List<int>>();
     List<string> labels = new List<string>();
     OrderApi orderApi = new OrderApi();
     OrderReportData report = new OrderReportData();
     Criteria<OrderProperty> orderCriteria = new Criteria<OrderProperty>();
     orderCriteria.PagingInfo = new PagingInfo(orderApi.RequestInformationRef.PagingSize);
     orderCriteria = Util_GetDates(orderCriteria);
     report = orderApi.GetReport(orderCriteria);
     dataset.Add(Util_GetDateValues(report));
     labels = Util_GetDateLabels(report);
     TrendTimeLineChart.LoadSplitData(StartDate, StartDate, labels.ToArray(), dataset.ToArray());
 }
Esempio n. 24
0
        public void TestLeafProperties()
        {
            //-------------Setup Test Pack ------------------
            //-------------Test Pre-conditions --------------

            //-------------Execute test ---------------------
            Criteria criteria = new Criteria("MyField", Criteria.ComparisonOp.Equals, "MyValue");

            //-------------Test Result ----------------------
            Assert.IsNotNull(criteria.Field);
            Assert.AreEqual("MyField", criteria.Field.PropertyName);
            Assert.IsNull(criteria.Field.Source);
            Assert.AreEqual("MyField", criteria.Field.FieldName);
            Assert.AreEqual("MyValue", criteria.FieldValue);
            Assert.AreEqual(Criteria.ComparisonOp.Equals, criteria.ComparisonOperator);
        }
Esempio n. 25
0
 public ActionResult QuickSearch(FormCollection collection, uint pagesize = DefaultPageSize, uint pageno = 1)
 {
     using (var session = new SessionFactory().OpenSession())
     {
         var q = new Criteria<ActionLog>(session).Page(pagesize, pageno)
             .Asc(m => m.CreatedAt).AddOrder(collection, ViewData);
         if (collection != null)
         {
             if (collection.AllKeys.Contains("starttime"))
             {
                 var dtStr = (collection["starttime"] + string.Empty).Trim();
                 if (!string.IsNullOrEmpty(dtStr))
                 {
                     DateTime startAt;
                     if (DateTime.TryParse(dtStr, out startAt))
                     {
                         q.And(m => m.CreatedAt >= startAt);
                     }
                 }
             }
             if (collection.AllKeys.Contains("endtime"))
             {
                 var dtStr = (collection["endtime"] + string.Empty).Trim();
                 if (!string.IsNullOrEmpty(dtStr))
                 {
                     DateTime endAt;
                     if (DateTime.TryParse(dtStr, out endAt))
                     {
                         q.And(m => m.CreatedAt <= endAt);
                     }
                 }
             }
             if (collection.AllKeys.Contains("keywords"))
             {
                 var keywords = (collection["keywords"] + string.Empty).Trim();
                 if (!string.IsNullOrEmpty(keywords))
                 {
                     q.And(m => m.Actor.Include(keywords), m => m.Category.Include(keywords),
                         m => m.Title.Include(keywords), m => m.Description.Include(keywords),
                         m => m.Result.Include(keywords));
                 }
             }
         }
         var models = q.Find().PartPage(pageno, pagesize, q.Count());
         return View(models);
     }
 }
Esempio n. 26
0
 public CriteriaDto(Criteria criteria)
 {
     Id = criteria.ID;
     Name = criteria.Name;
     DataType = (DataFieldDto.DataType) Enum.Parse(typeof (DataField.DataType), criteria.DataType.ToString());
     Description = criteria.Description;
     if (criteria.TypeInfo != null)
     {
         TypeInfo = criteria.TypeInfo.Select(s => s.Value).ToArray();
     }
     if (criteria.DataMatch != null)
     {
         DataMatch = criteria.DataMatch.Select(s => s.Value).ToArray();
     }
     Rule = (CriteriaRule) Enum.Parse(typeof (Criteria.CriteriaRule), criteria.Rule.ToString());
     ;
 }
Esempio n. 27
0
        public void Test_ToString_IsNullCriteria()
        {
            //-------------Setup Test Pack ------------------
            const string surnameField = "Surname";
            Criteria criteria = new Criteria(surnameField, Criteria.ComparisonOp.Is, null);
            const string surnameTable = "surname_table";
            criteria.Field.Source = new Source(surnameTable);
            CriteriaDB surnameCriteria = new CriteriaDB(criteria);

            //-------------Execute test ---------------------
            string tostring = surnameCriteria.ToString(new SqlFormatter("<<", ">>", "",""),
                                                       delegate(object value) { return Convert.ToString(value); },
                                                       SetupSingleAlias(surnameTable));
            //-------------Test Result ----------------------

            Assert.AreEqual(string.Format("a1.<<{0}>> IS NULL",  surnameField), tostring);
        }
Esempio n. 28
0
        private static Criteria GetCriteria(CriteriaExpression criteriaExpression)
        {

            Criteria criteria;
            if (criteriaExpression.Left.IsLeaf())//I.e. the left is a prop name.
            {
                criteria = GetCriteriaLeaf(criteriaExpression);
            }
            else
            {
                Criteria leftCriteria = GetCriteria(criteriaExpression.Left);
                Criteria rightCriteria = GetCriteria(criteriaExpression.Right);
                Criteria.LogicalOp logicalOp = CreateLogicalOperator(criteriaExpression.Expression);
                criteria = new Criteria(leftCriteria, logicalOp, rightCriteria);
            }
            return criteria;
        }
Esempio n. 29
0
        public void Test_All_Pager_Viewer()
        {
            IRepository repo = new Repository();

            IPager criteria = new Criteria { PagingSize = 20 };

            Assert.IsFalse(criteria.TotalCount > 0);

            var query = repo.All<BetView>(criteria, "BetTime DESC");

            Assert.IsNotNull(query);
            Assert.IsInstanceOfType(query, typeof(List<BetView>));
            Assert.IsTrue(query.Any());

            Assert.IsTrue(criteria.TotalCount > 0);
            Assert.AreEqual(criteria.PagingSize.ToString(), query.Count.ToString());
        }
Esempio n. 30
0
    public Criteria<OrderProperty> Util_GetDates(Criteria<OrderProperty> orderCriteria)
    {
        SetTitle(GetMessage("lbl sales trend label"));

        if (drp_period.Items.Count == 0)
        {
            drp_period.Items.Add(new ListItem(GetMessage("lbl sync daily"), "#daily"));
            drp_period.Items.Add(new ListItem(GetMessage("lbl sync monthly"), "#monthly"));
        }
        switch (hdn_filter.Value)
        {
            //case "#weekly":
            //    periodpulldown = "<a href=\"#periodMenu" + ClientID + "\" class=\"commerceperiod" + ClientID + " commerceperiodlink\">" + GetMessage("lbl sync weekly") + "</a>";
            //    orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.Subtract(new TimeSpan(90, 0, 0, 0)));
            //    break;

            case "#monthly":
                drp_period.SelectedIndex = 1;
                Intervals = 6;
                StartDate = DateTime.Now.AddMonths(Intervals * -1);
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, StartDate);
                TrendTimeLineChart.TimeUnitInterval = controls_reports_TimeLineChart.TimeUnit.Month;
                break;

            //case "#quarterly":
            //    periodpulldown = "<a href=\"#periodMenu" + ClientID + "\" class=\"commerceperiod" + ClientID + " commerceperiodlink\">" + GetMessage("lbl quarterly") + "</a>";
            //    orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.AddYears(-1));
            //    break;

            //case "#yearly":
            //    periodpulldown = "<a href=\"#periodMenu" + ClientID + "\" class=\"commerceperiod" + ClientID + " commerceperiodlink\">" + GetMessage("lbl yearly") + "</a>";
            //    orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, DateTime.Now.AddYears(-3));
            //    break;

            default : // "#daily":
                drp_period.SelectedIndex = 0;
                Intervals = 7;
                StartDate = DateTime.Now.Subtract(new TimeSpan(Intervals, 0, 0, 0));
                orderCriteria.AddFilter(OrderProperty.DateCreated, CriteriaFilterOperator.GreaterThanOrEqualTo, StartDate);
                TrendTimeLineChart.TimeUnitInterval = controls_reports_TimeLineChart.TimeUnit.Day;
                break;
        }

        return orderCriteria;
    }
Esempio n. 31
0
 public SerializableDictionary <Handle, string> DeleteMany(Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 32
0
 public IList <IReservas> GetMany(Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 33
0
        /// <summary>
        /// Submits the criteria or saves changes
        /// </summary>
        private void SubmitCriteria()
        {
            // Check if input data is correct
            if (!ValidateInputData())
            {
                InvalidDataError = true;
                return;
            }

            // Hide any errors
            InvalidDataError = false;

            // Update values in grading object
            if (Criteria.IsMarkAIncluded)
            {
                Criteria.UpdateMark(Marks.A, int.Parse(TopValueMarkA), int.Parse(BottomValueMarkA));
            }
            Criteria.UpdateMark(Marks.B, int.Parse(TopValueMarkB), int.Parse(BottomValueMarkB));
            Criteria.UpdateMark(Marks.C, int.Parse(TopValueMarkC), int.Parse(BottomValueMarkC));
            Criteria.UpdateMark(Marks.D, int.Parse(TopValueMarkD), int.Parse(BottomValueMarkD));
            Criteria.UpdateMark(Marks.E, int.Parse(TopValueMarkE), int.Parse(BottomValueMarkE));
            Criteria.UpdateMark(Marks.F, int.Parse(TopValueMarkF), int.Parse(BottomValueMarkF));

            try
            {
                // Try to save the grading
                CriteriaFileWriter.WriteToFile(Name, Criteria);

                // Check if we were editing existing one or not
                if (EditingCriteriaMode)
                {
                    // If user has changed the name of the criteria, try to delete old one
                    if (Name != EditingCriteriaOldName)
                    {
                        CriteriaFileWriter.DeleteXmlFileByName(EditingCriteriaOldName);
                    }
                }
            }
            catch (Exception ex)
            {
                // If an error occured, show info to the user
                IoCServer.UI.ShowMessage(new MessageBoxDialogViewModel
                {
                    Title   = LocalizationResource.SaveError,
                    Message = LocalizationResource.UnableToSaveCurrentCriteria + "\n" +
                              LocalizationResource.ErrorContentSemicolon + ex.Message,
                    OkText = LocalizationResource.Ok
                });

                IoCServer.Logger.Log("Unable to save/delete criteria file, error message: " + ex.Message);

                // Don't do anything after the error is shown
                return;
            }

            // Get out of editing mode
            EditingCriteriaMode = false;

            // Mark all criteria unchecked
            CriteriaListViewModel.Instance.UncheckAll();

            // Reload the criteria list to include newly created criteria
            CriteriaListViewModel.Instance.LoadItems();

            // Reload the viewmodel with the sample data
            LoadCriteria(new GradingPercentage());
            Name = "";
        }
Esempio n. 34
0
 private static IEnumerable <Type> GetTypes(this IEnumerable <Assembly> assemblies, Criteria criteria)
 {
     foreach (Assembly assembly in assemblies)
     {
         foreach (Type type in assembly.GetTypes(criteria))
         {
             yield return(type);
         }
     }
 }
Esempio n. 35
0
        public void TestFindAll_UsingClassDef_BUGFIX_ShouldBeThreadsafe(string aaa)
        {
            //---------------Set up test pack-------------------
            BORegistry.DataAccessor = new DataAccessorInMemory(new DataStoreInMemory());
            ClassDef.ClassDefs.Clear();
            ContactPersonTestBO.LoadDefaultClassDef();
            OrganisationTestBO.LoadDefaultClassDef();
            var dataStore = new DataStoreInMemory();
            var now       = DateTime.Now;
            var cp1       = new ContactPersonTestBO {
                DateOfBirth = now, Surname = TestUtil.GetRandomString()
            };

            cp1.Save();
            dataStore.Add(cp1);
            var cp2 = new ContactPersonTestBO {
                DateOfBirth = now, Surname = TestUtil.GetRandomString()
            };

            cp2.Save();
            dataStore.Add(cp2);
            //var criteria = MockRepository.GenerateStub<Criteria>("DateOfBirth", Criteria.ComparisonOp.Equals, now);
            //criteria.Stub(o => o.IsMatch(Arg<IBusinessObject>.Is.Anything)).WhenCalled(invocation =>
            //{
            //    Thread.Sleep(100);
            //    invocation.ReturnValue = true;
            //}).Return(true);
            var criteria = new Criteria("DateOfBirth", Criteria.ComparisonOp.Equals, now);

            for (int i1 = 0; i1 < 1000; i1++)
            {
                dataStore.Add(OrganisationTestBO.CreateSavedOrganisation());
            }

            var threads = new List <Thread>();

            threads.Add(new Thread(() =>
            {
                for (int i1 = 0; i1 < 1000; i1++)
                {
                    dataStore.Add(OrganisationTestBO.CreateSavedOrganisation());
                }
            }));

            var exceptions = new List <Exception>();

            threads.Add(new Thread(() =>
            {
                try
                {
                    for (int i = 0; i < 10; i++)
                    {
                        dataStore.FindAll(ClassDef.Get <ContactPersonTestBO>(), criteria);
                    }
                }
                catch (Exception ex)
                {
                    exceptions.Add(ex);
                }
            }));


            //---------------Execute Test ----------------------
            threads.AsParallel().ForAll(thread => thread.Start());
            threads.AsParallel().ForAll(thread => thread.Join());
            //Assert.DoesNotThrow(() =>
            //{
            //var col = dataStore.FindAll(ClassDef.Get<ContactPersonTestBO>(), criteria);
            //thread.Join();
            //});
            //---------------Test Result -----------------------
            if (exceptions.Count > 0)
            {
                Assert.Fail("Has an Exception: " + exceptions[0].ToString());
            }
        }
Esempio n. 36
0
 private void DataPortal_Delete(Criteria criteria)
 {
     Csla.ApplicationContext.GlobalContext.Clear();
     ApplicationContext.GlobalContext.Add("SplitOverload", "Deleted");
 }
Esempio n. 37
0
 public IReservas GetForEdit(Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 38
0
 public IReservas GetForEdit(Expression <Func <IReservas, bool> > expression, Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 39
0
 public IReservas GetFirstOrDefault(Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 40
0
        public override IEnumerable <System.Linq.Expressions.MemberBinding> InnerSelectBindings(Type selectType, System.Linq.Expressions.ParameterExpression sourceTypeParameter)
        {
            //to provide for a resulting column to be returned, going to manufacture a column result that will be the combination of the criteria values as a single value.
            //This will still allow for grouping to work as normal, and not affect the results from a count per distinct patient bias.

            List <string> codeTypes  = new List <string>();
            List <string> codeValues = new List <string>();

            var codeCriteria = Criteria.SelectMany(c => c.Terms.Where(t => t.Type == ModelTermsFactory.ProcedureCodesID).Concat(c.Criteria.SelectMany(cc => cc.Terms.Where(t => t.Type == ModelTermsFactory.ProcedureCodesID)))).ToArray();

            if (codeCriteria.Any())
            {
                foreach (var term in codeCriteria)
                {
                    DTO.Enums.DiagnosisCodeTypes codeType;
                    if (!Enum.TryParse <DTO.Enums.DiagnosisCodeTypes>(term.GetStringValue("CodeType"), out codeType))
                    {
                        codeType = DTO.Enums.DiagnosisCodeTypes.Any;
                    }

                    var codes = (term.GetStringValue("CodeValues") ?? "").Split(new[] { ';' }).Where(x => !string.IsNullOrEmpty(x.Trim())).Select(s => s.Trim()).Distinct().ToArray();
                    if (codes.Length == 0)
                    {
                        continue;
                    }

                    codeTypes.Add(Utilities.ToString(codeType, true));
                    codeValues.AddRange(codes);
                }
            }

            if (codeTypes.Count == 0)
            {
                codeTypes.Add("Any");
            }

            if (codeValues.Count == 0)
            {
                codeValues.Add("Any");
            }

            codeTypes.Sort();
            codeValues.Sort();

            string codeTypeString   = string.Join(", ", codeTypes.Distinct().ToArray());
            string codeValuesString = string.Join(", ", codeValues.Distinct().ToArray());

            int index = codeTypeString.LastIndexOf(',');

            if (index > 0)
            {
                codeTypeString = codeTypeString.Substring(0, index) + codeTypeString.Substring(index).Replace(",", ", or");
            }

            index = codeValuesString.LastIndexOf(',');
            if (index > 0)
            {
                codeValuesString = codeValuesString.Substring(0, index) + codeValuesString.Substring(index).Replace(",", ", or");
            }

            return(new[] {
                Expression.Bind(selectType.GetProperty("ProcedureCodeType"), Expression.Constant(codeTypeString)),
                Expression.Bind(selectType.GetProperty("ProcedureCode"), Expression.Constant(codeValuesString))
            });
        }
Esempio n. 41
0
 private CampaignCriteriaResultsModel CreateCampaignCriteriaResults(Campaign campaign, Criteria criteria, IList <RegisteredUser> users)
 {
     return(new CampaignCriteriaResultsModel(CreateCampaignCriteria(campaign, criteria), users));
 }
 protected virtual void AddCriterion(Expression <Func <T, bool> > criterion)
 {
     Criteria.Add(criterion);
 }
 private void DataPortal_Create(Criteria criteria)
 {
     // TODO: load default values
 }
Esempio n. 44
0
 public SerializableDictionary <Handle, string> DeleteMany(Expression <Func <IReservas, bool> > expression, Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 45
0
 private void DataPortal_Fetch(Criteria criteria)
 {
     _id = criteria.Id;
     Csla.ApplicationContext.GlobalContext.Clear();
     ApplicationContext.GlobalContext.Add("SplitOverload", "Fetched");
 }
Esempio n. 46
0
 public IReservas GetForEdit(EntityDefinition entityDefinition, Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 47
0
 IDatabaseQuery <TEntity> IDatabaseQuery <TEntity> .Where(params ICriterion[] criteria)
 {
     Criteria.AddRange(criteria);
     return(this);
 }
Esempio n. 48
0
File: Effect.cs Progetto: tbrax/cd0
 public void addCriteria(Criteria c)
 {
     criteria.Add(c);
 }
Esempio n. 49
0
        private string GetLocationForExif(ExifInterface exif)
        {
            string          exifExtraData   = string.Empty;
            var             activity        = (MainActivity)CrossCurrentActivity.Current.Activity;
            LocationManager locationManager = activity.locationManager;
            var             criteria        = new Criteria {
                PowerRequirement = Power.Medium
            };

            var bestProvider = locationManager.GetBestProvider(criteria, true);
            var location     = locationManager.GetLastKnownLocation(bestProvider);

            if (location != null)
            {
                string locProvider = location.Provider;
                long   newlastfix  = location.Time;
                bool   uniqueFix   = newlastfix != lastfix;
                lastfix       = newlastfix;
                exifExtraData = "loc=" + locProvider + "," + "uniqueLocFix=" + uniqueFix + ",";;
                double locLat = location.Latitude;
                double locLon = location.Longitude;

                try
                {
                    int    num1Lat = (int)Math.Floor(locLat);
                    int    num2Lat = (int)Math.Floor((locLat - num1Lat) * 60);
                    double num3Lat = (locLat - ((double)num1Lat + ((double)num2Lat / 60))) * 3600000;

                    int    num1Lon = (int)Math.Floor(locLon);
                    int    num2Lon = (int)Math.Floor((locLon - num1Lon) * 60);
                    double num3Lon = (locLon - ((double)num1Lon + ((double)num2Lon / 60))) * 3600000;

                    exif.SetAttribute(ExifInterface.TagGpsLatitude, num1Lat + "/1," + num2Lat + "/1," + num3Lat + "/1000");
                    exif.SetAttribute(ExifInterface.TagGpsLongitude, num1Lon + "/1," + num2Lon + "/1," + num3Lon + "/1000");

                    if (locLat > 0)
                    {
                        exif.SetAttribute(ExifInterface.TagGpsLatitudeRef, "N");
                    }
                    else
                    {
                        exif.SetAttribute(ExifInterface.TagGpsLatitudeRef, "S");
                    }

                    if (locLon > 0)
                    {
                        exif.SetAttribute(ExifInterface.TagGpsLongitudeRef, "E");
                    }
                    else
                    {
                        exif.SetAttribute(ExifInterface.TagGpsLongitudeRef, "W");
                    }
                }
                catch (Exception e)
                {
                }
            }



            return(exifExtraData);
        }
 private void DataPortal_Delete(Criteria criteria)
 {
     // TODO: delete values
 }
Esempio n. 51
0
        public bool ActivateFor(Row row)
        {
            if (ReferenceEquals(null, Target))
            {
                return(false);
            }

            attr = Target.GetAttribute <LinkingSetRelationAttribute>();
            if (attr == null)
            {
                return(false);
            }

            if (!(row is IIdRow))
            {
                throw new ArgumentException(String.Format("Field '{0}' in row type '{1}' has a LinkingSetRelationBehavior " +
                                                          "but it doesn't implement IIdRow!",
                                                          Target.PropertyName ?? Target.Name, row.GetType().FullName));
            }


            var listType = Target.ValueType;

            if (!listType.IsGenericType ||
                listType.GetGenericTypeDefinition() != typeof(List <>))
            {
                throw new ArgumentException(String.Format("Field '{0}' in row type '{1}' has a LinkingSetRelationBehavior " +
                                                          "but its property type is not a generic List (e.g. List<int>)!",
                                                          Target.PropertyName ?? Target.Name, row.GetType().FullName));
            }

            rowType = attr.RowType;
            if (rowType.IsAbstract ||
                !typeof(Row).IsAssignableFrom(rowType))
            {
                throw new ArgumentException(String.Format(
                                                "Field '{0}' in row type '{1}' has a LinkingSetRelationBehavior " +
                                                "but specified row type is not valid row class!",
                                                Target.PropertyName ?? Target.Name, row.GetType().FullName));
            }

            if (!typeof(IIdRow).IsAssignableFrom(rowType))
            {
                throw new ArgumentException(String.Format(
                                                "Field '{0}' in row type '{1}' has a LinkingSetRelationBehavior " +
                                                "but specified row type doesn't implement IIdRow!",
                                                Target.PropertyName ?? Target.Name, row.GetType().FullName));
            }

            listFactory = FastReflection.DelegateForConstructor <IList>(listType);
            rowFactory  = FastReflection.DelegateForConstructor <Row>(rowType);

            var detailRow = rowFactory();

            thisKeyField = detailRow.FindFieldByPropertyName(attr.ThisKey) ??
                           detailRow.FindField(attr.ThisKey);

            if (ReferenceEquals(thisKeyField, null))
            {
                throw new ArgumentException(String.Format("Field '{0}' doesn't exist in row of type '{1}'." +
                                                          "This field is specified for a linking set relation in field '{2}' of row type '{3}'.",
                                                          attr.ThisKey, detailRow.GetType().FullName,
                                                          Target.PropertyName ?? Target.Name, row.GetType().FullName));
            }

            this.thisKeyCriteria = new Criteria(thisKeyField.PropertyName ?? thisKeyField.Name);

            itemKeyField = detailRow.FindFieldByPropertyName(attr.ItemKey) ??
                           detailRow.FindField(attr.ItemKey);

            if (ReferenceEquals(itemKeyField, null))
            {
                throw new ArgumentException(String.Format("Field '{0}' doesn't exist in row of type '{1}'." +
                                                          "This field is specified for a linking set relation in field '{2}' of row type '{3}'.",
                                                          attr.ItemKey, detailRow.GetType().FullName,
                                                          Target.PropertyName ?? Target.Name, row.GetType().FullName));
            }

            if (!string.IsNullOrEmpty(attr.FilterField))
            {
                this.filterField = detailRow.FindFieldByPropertyName(attr.FilterField) ?? detailRow.FindField(attr.FilterField);
                if (ReferenceEquals(null, this.filterField))
                {
                    throw new ArgumentException(String.Format("Field '{0}' doesn't exist in row of type '{1}'." +
                                                              "This field is specified for a linking set relation as FilterField in field '{2}' of row type '{3}'.",
                                                              attr.FilterField, detailRow.GetType().FullName,
                                                              Target.PropertyName ?? Target.Name, row.GetType().FullName));
                }

                this.filterCriteria = new Criteria(filterField.PropertyName ?? filterField.Name);
                this.filterValue    = filterField.ConvertValue(attr.FilterValue, CultureInfo.InvariantCulture);
                if (this.filterValue == null)
                {
                    this.filterCriteria = this.filterCriteria.IsNull();
                    this.queryCriteria  = this.filterField.IsNull();
                }
                else
                {
                    this.filterCriteria = this.filterCriteria == new ValueCriteria(this.filterValue);
                    this.queryCriteria  = this.filterField == new ValueCriteria(this.filterValue);
                }
            }

            queryCriteria = queryCriteria & ServiceQueryHelper.GetNotDeletedCriteria(detailRow);

            return(true);
        }
        public void JsonCriteriaConverter_SerializesExistsCriteriaProperly()
        {
            var actual = Criteria.Exists("some expression").ToJson();

            Assert.AreEqual(actual, "[\"exists\",[\"some expression\"]]");
        }
Esempio n. 53
0
            public IList <AdSpot> ProduceAdTags(string pageCtx)
            {
                // Page Context
                var pgCtx = JsonConvert.DeserializeObject <PageContext>(pageCtx);

                // Page Advertisement Meta
                dynamic adMeta = JObject.Parse(pageCtx);

                var criteria1 = new Criteria
                {
                    Fuel     = Criteria.FuelType.Gas,
                    Make     = (adMeta.ads[0].AdMake ?? string.Empty),
                    Model    = (adMeta.ads[0].AdModel ?? string.Empty),
                    Year     = (adMeta.ads[0].AdVehicleYear ?? string.Empty),
                    Category = (adMeta.ads[0].AdCategory ?? string.Empty)
                };

                var criteria2 = new Criteria
                {
                    Fuel     = Criteria.FuelType.Gas,
                    Make     = (adMeta.ads[1].AdMake ?? string.Empty),
                    Model    = (adMeta.ads[1].AdModel ?? string.Empty),
                    Year     = (adMeta.ads[1].AdVehicleYear ?? string.Empty),
                    Category = (adMeta.ads[1].AdCategory ?? string.Empty)
                };

                var criteria3 = new Criteria
                {
                    Fuel     = Criteria.FuelType.Gas,
                    Make     = (adMeta.ads[2].AdMake ?? string.Empty),
                    Model    = (adMeta.ads[2].AdModel ?? string.Empty),
                    Year     = (adMeta.ads[2].AdVehicleYear ?? string.Empty),
                    Category = (adMeta.ads[2].AdCategory ?? string.Empty)
                };

                var criteria4 = new Criteria
                {
                    Fuel     = Criteria.FuelType.Gas,
                    Make     = (adMeta.ads[3].AdMake ?? string.Empty),
                    Model    = (adMeta.ads[3].AdModel ?? string.Empty),
                    Year     = (adMeta.ads[3].AdVehicleYear ?? string.Empty),
                    Category = (adMeta.ads[3].AdCategory ?? string.Empty)
                };

                if (pgCtx.IsDesktop || pgCtx.IsTablet)
                {
                    return(new[]
                    {
                        new AdSpot
                        {
                            Tile = TagAs.Tile.One,
                            FirstLevel = TagAs.FirstLevel.New,
                            Device = TagAs.Device.Desktop,
                            SecondLevel = TagAs.SecondLevel.LandingPage,
                            ThirdLevel = TagAs.ThirdLevel.None,
                            Section = TagAs.Section.Landing,
                            Size = TagAs.Size.Desktop.Sz728X90,
                            Criteria = criteria1
                        },
                        new AdSpot
                        {
                            Tile = TagAs.Tile.Two,
                            FirstLevel = TagAs.FirstLevel.New,
                            Device = TagAs.Device.Desktop,
                            SecondLevel = TagAs.SecondLevel.LandingPage,
                            ThirdLevel = TagAs.ThirdLevel.None,
                            Section = TagAs.Section.Landing,
                            Size = TagAs.Size.Desktop.Sz300X250,
                            Criteria = criteria2
                        },
                        new AdSpot
                        {
                            Tile = TagAs.Tile.Three,
                            FirstLevel = TagAs.FirstLevel.New,
                            Device = TagAs.Device.Desktop,
                            SecondLevel = TagAs.SecondLevel.LandingPage,
                            ThirdLevel = TagAs.ThirdLevel.None,
                            Section = TagAs.Section.Landing,
                            Size = TagAs.Size.Desktop.Sz300X120,
                            Criteria = criteria3
                        },
                        new AdSpot
                        {
                            Tile = TagAs.Tile.Four,
                            FirstLevel = TagAs.FirstLevel.New,
                            Device = TagAs.Device.Desktop,
                            SecondLevel = TagAs.SecondLevel.LandingPage,
                            ThirdLevel = TagAs.ThirdLevel.None,
                            Section = TagAs.Section.Landing,
                            Size = TagAs.Size.Desktop.Sz400X40,
                            Criteria = criteria4
                        }
                    });
                }

                return(new[]
                {
                    new AdSpot
                    {
                        Tile = TagAs.Tile.Eleven,
                        FirstLevel = TagAs.FirstLevel.New,
                        Device = TagAs.Device.Mobile,
                        SecondLevel = TagAs.SecondLevel.LandingPage,
                        ThirdLevel = TagAs.ThirdLevel.None,
                        Section = TagAs.Section.Landing,
                        Size = TagAs.Size.Mobile.Sz320X50Flex,
                        Criteria = criteria1
                    },
                    new AdSpot
                    {
                        Tile = TagAs.Tile.Twelve,
                        FirstLevel = TagAs.FirstLevel.New,
                        Device = TagAs.Device.Mobile,
                        SecondLevel = TagAs.SecondLevel.LandingPage,
                        ThirdLevel = TagAs.ThirdLevel.None,
                        Section = TagAs.Section.Landing,
                        Size = TagAs.Size.Mobile.Sz320X51Flex,
                        Criteria = criteria2
                    }
                });
            }
Esempio n. 54
0
 public IList <IReservas> GetMany(Expression <Func <IReservas, bool> > expression, Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 55
0
 public long CountMany(Criteria criteria)
 {
     throw new NotImplementedException();
 }
 public OrCriteria(Criteria criteria, Criteria otherCriteria)
 {
     Criteria      = criteria;
     OtherCriteria = otherCriteria;
 }
Esempio n. 57
0
 public Handle GetHandle(Expression <Func <IReservas, bool> > expression, Criteria criteria)
 {
     throw new NotImplementedException();
 }
Esempio n. 58
0
 public Handle GetHandle(Criteria criteria)
 {
     throw new NotImplementedException();
 }
 /// <summary>
 /// Constructor for BaseSpecification with default Criteria.
 /// </summary>
 protected BaseSpecification(Expression <Func <T, bool> > criterion)
 {
     Criteria.Add(criterion);
 }
Esempio n. 60
0
 public override string ToString()
 {
     return(string.Join(" and ", Criteria.Select(f => f.ToString()).ToArray()));
 }