예제 #1
0
        public MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().OrderByDesc("Id");

            if (!string.IsNullOrWhiteSpace(Key))
            {
                util.AndContains("Name", Key.Trim());
            }

            if (!string.IsNullOrWhiteSpace(EmployeeNumber))
            {
                util.AndContains("EmployeeNumber", EmployeeNumber.Trim());
            }

            if (!string.IsNullOrWhiteSpace(Job))
            {
                util.AndEqual("Job", Job.Trim());
            }

            if (DeptId.HasValue)
            {
                util.AndEqual("DeptId", DeptId.Value);
            }

            return(util);
        }
        public override MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().AndEqual("IsDel", false);

            if (SchoolId.HasValue)
            {
                util.AndEqual("SchoolId", SchoolId.Value);
            }

            if (!string.IsNullOrWhiteSpace(Key))
            {
                util.AndContains("Name", Key.Trim());
            }

            if (!string.IsNullOrWhiteSpace(Card))
            {
                util.AndEqual("Card", Card.Trim());
            }

            if (SalerId.HasValue)
            {
                util.AndEqual("SalerId", SalerId.Value);
            }

            if (!string.IsNullOrWhiteSpace(Mobile))
            {
                util.AndContains("Mobile", Mobile.Trim());
            }

            util.OrderBy(SetOrderBy());

            return(util);
        }
        public override MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().AndEqual("IsDel", false);

            if (!string.IsNullOrWhiteSpace(Key))
            {
                // util.AndContains(new string[] { "Title", "Name" }, Key.Trim());
            }

            if (SchoolId.HasValue)
            {
                util.AndEqual("SchoolId", SchoolId.Value);
            }

            if (StudentId.HasValue)
            {
                util.AndEqual("StudentId", StudentId.Value);
            }

            if (!string.IsNullOrWhiteSpace(StudentName))
            {
                util.AndContains("StudentName", StudentName.Trim());
            }

            if (!string.IsNullOrWhiteSpace(PaymentMethod))
            {
                util.AndContains("PaymentMethod", PaymentMethod.Trim());
            }

            util.OrderBy(SetOrderBy());

            return(util);
        }
        public override MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().AndEqual("IsDel", false);

            if (!string.IsNullOrWhiteSpace(Key))
            {
                // util.AndContains(new string[] { "Title", "Name" }, Key.Trim());
            }

            if (SchoolId.HasValue)
            {
                util.AndEqual("SchoolId", SchoolId.Value);
            }

            if (!string.IsNullOrWhiteSpace(Account))
            {
                util.AndContains("Account", Account.Trim());
            }

            if (!string.IsNullOrWhiteSpace(Name))
            {
                util.AndContains("Name", Name.Trim());
            }

            if (!string.IsNullOrWhiteSpace(RoleIds))
            {
                util.AndContains("RoleIds", RoleIds.Trim());
            }

            util.OrderBy(SetOrderBy());

            return(util);
        }
예제 #5
0
        public override MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().AndEqual("IsDel", false);

            if (!string.IsNullOrWhiteSpace(Key))
            {
                util.AndContains("Name", Key.Trim());
            }

            if (!Enabled.HasValue)
            {
                util.AndEqual("Enabled", true);
            }
            else
            {
                util.AndEqual("Enabled", Enabled.Value);
            }

            if (SchoolId.HasValue)
            {
                util.AndEqual("SchoolId", SchoolId);
            }

            util.OrderBy(SetOrderBy());

            return(util);
        }
예제 #6
0
        public MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().OrderBy("Sort");

            if (!string.IsNullOrWhiteSpace(Key))
            {
                util.AndContains("Name", Key.Trim());
            }

            return(util);
        }
예제 #7
0
        public override MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().AndEqual("IsDel", false);

            if (!string.IsNullOrWhiteSpace(Key))
            {
                util.AndContains("Name", Key.Trim());
            }

            util.OrderBy(SetOrderBy());

            return(util);
        }
예제 #8
0
        public override MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().AndEqual("IsDel", false);

            if (!string.IsNullOrWhiteSpace(Key))
            {
                // util.AndContains(new string[] { "Title", "Name" }, Key.Trim());
            }

            if (SchoolId.HasValue)
            {
                util.AndEqual("SchoolId", SchoolId.Value);
            }

            if (StudentId.HasValue)
            {
                util.AndEqual("StudentId", StudentId.Value);
            }

            if (SalerId.HasValue)
            {
                util.AndEqual("SalerId", SalerId.Value);
            }

            if (!string.IsNullOrWhiteSpace(OrderType))
            {
                util.AndContains("OrderType", OrderType.Trim());
            }

            if (!string.IsNullOrWhiteSpace(ActualPayment))
            {
                util.AndContains("ActualPayment", ActualPayment.Trim());
            }

            util.OrderBy(SetOrderBy());

            return(util);
        }
예제 #9
0
        public MySearchUtil ToSearchUtil()
        {
            MySearchUtil util = MySearchUtil.New().OrderBy("Year DESC, Month DESC, Sort, SalerName");

            if (!string.IsNullOrWhiteSpace(Key))
            {
                util.AndContains(new string[] { "SalerName", "DeptName" }, Key.Trim());
            }

            if (SalerId.HasValue)
            {
                util.AndEqual("SalerId", SalerId.Value);
            }

            if (DeptId.HasValue)
            {
                util.AndEqual("DeptId", DeptId.Value);
            }

            if (Year.HasValue)
            {
                util.AndEqual("Year", Year.Value);
            }

            if (Month.HasValue)
            {
                util.AndEqual("Month", Month.Value);
            }

            if (Quarter.HasValue)
            {
                util.AndEqual("Quarter", Quarter.Value);
            }

            return(util);
        }