• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Models.SearchStatementModel类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中com.Sconit.Web.Models.SearchStatementModel的典型用法代码示例。如果您正苦于以下问题:C# SearchStatementModel类的具体用法?C# SearchStatementModel怎么用?C# SearchStatementModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SearchStatementModel类属于com.Sconit.Web.Models命名空间,在下文中一共展示了SearchStatementModel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, SMSRecSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("Issue", searchModel.Issue, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("MsgID", searchModel.MsgID, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Content", searchModel.Content, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("SrcID", searchModel.SrcID, HqlStatementHelper.LikeMatchMode.Start, "sms", ref whereStatement, param);
            if (searchModel.DateFrom != null & searchModel.DateTo != null)
            {
                HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.DateFrom, searchModel.DateTo, "sms", ref whereStatement, param);
            }
            else if (searchModel.DateFrom != null & searchModel.DateTo == null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.DateFrom, "sms", ref whereStatement, param);
            }
            else if (searchModel.DateFrom == null & searchModel.DateTo != null)
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.DateTo, "sms", ref whereStatement, param);
            }
            HqlStatementHelper.AddEqStatement("EventHandler", SMSStatus.SMSEventHeadler_MESSAGERECEIVEDINTERFACE, "sms", ref whereStatement, param);

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:35,代码来源:SMSRecController.cs


示例2: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, SearchModel searchModel)
        {
            string whereStatement = "";

            IList<object> param = new List<object>();
            HqlStatementHelper.AddEqStatement("OrderNo", searchModel.OrderNo, "t", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("ReceiptNo", searchModel.ReceiptNo, "t", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Status", searchModel.Status, "t", ref whereStatement, param);

            if (searchModel.StartDate != null & searchModel.EndDate != null)
            {
                HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartDate, searchModel.EndDate, "t", ref whereStatement, param);
            }
            else if (searchModel.StartDate != null & searchModel.EndDate == null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartDate, "t", ref whereStatement, param);
            }
            else if (searchModel.StartDate == null & searchModel.EndDate != null)
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndDate, "t", ref whereStatement, param);
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by t.CreateDate desc";
            }
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:35,代码来源:PostDOController.cs


示例3: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, PickTaskSearchModel searchModel)
        {
            string whereStatement = string.Empty;
            
            IList<object> param = new List<object>();
            HqlStatementHelper.AddEqStatement("PickId", searchModel.PickId, "c", ref whereStatement, param);

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = "select count(*) from PickResult  c";
            searchStatementModel.SelectStatement = "select c from PickResult as c";
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:18,代码来源:PickResultController.cs


示例4: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, GenVanProdOrderSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("ZLINE", searchModel.SearchZLINE, HqlStatementHelper.LikeMatchMode.Start, "u", ref whereStatement, param);

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:19,代码来源:GenVanProdOrderController.cs


示例5: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, OrderMasterSearchModel searchModel )
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();
            if (!string.IsNullOrWhiteSpace(searchModel.TraceCode))
            {
                searchModel.TraceCode = searchModel.TraceCode.PadLeft(10, '0').Substring(2);
            }
            HqlStatementHelper.AddLikeStatement("VanCode", searchModel.TraceCode,HqlStatementHelper.LikeMatchMode.End, "p", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("OrderNo", searchModel.OrderNo, "p", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("ProdLine", searchModel.ProdLine, "p", ref whereStatement, param);

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:24,代码来源:ProdOrderPauseResumeController.cs


示例6: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, FlowSearchModel searchModel)
        {
            string whereStatement = " where f.Type=2 ";

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Anywhere, "f", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Description", searchModel.Description, HqlStatementHelper.LikeMatchMode.Anywhere, "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("LocationTo", searchModel.LocationTo,  "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("LocationFrom", searchModel.LocationFrom,  "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("PartyFrom", searchModel.PartyFrom, "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("PartyTo", searchModel.PartyTo, "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("IsActive", searchModel.IsActive, "f", ref whereStatement, param);

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:druidwang,项目名称:Les_parts,代码行数:25,代码来源:TransferFlowController.cs


示例7: PrepareDetailSearchStatement

        private SearchStatementModel PrepareDetailSearchStatement(GridCommand command, FlowDetailSearchModel searchModel, string flowCode)
        {
            string whereStatement = " where f.Flow='" + flowCode + "'";
            IList<object> param = new List<object>();
            HqlStatementHelper.AddLikeStatement("Item", searchModel.Item, HqlStatementHelper.LikeMatchMode.Start, "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Flow", searchModel.Flow, "f", ref whereStatement, param);
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by f.Sequence asc";
            }
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountDetailStatement;
            searchStatementModel.SelectStatement = selectDetailStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:druidwang,项目名称:Les_parts,代码行数:20,代码来源:TransferFlowController.cs


示例8: PrepareSearchShipAddressStatement

 private SearchStatementModel PrepareSearchShipAddressStatement(GridCommand command, PartyAddressSearchModel searchModel, string partyCode)
 {
     string whereStatement = "  where pa.Party='" + partyCode + "' and  pa.Type='0' ";
     IList<object> param = new List<object>();
     //HqlStatementHelper.AddLikeStatement("Party", searchModel.Party, HqlStatementHelper.LikeMatchMode.Start, "pa", ref whereStatement, param);
     HqlStatementHelper.AddLikeStatement("Address.Code", searchModel.AddressCode, HqlStatementHelper.LikeMatchMode.Start, "pa", ref whereStatement, param);
     HqlStatementHelper.AddLikeStatement("Address.AddressContent", searchModel.AddressContent, HqlStatementHelper.LikeMatchMode.Start, "pa", ref whereStatement, param);
     string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
     SearchStatementModel searchStatementModel = new SearchStatementModel();
     searchStatementModel.SelectCountStatement = selectShipAddressCountStatement;
     searchStatementModel.SelectStatement = selectShipAddressStatement;
     searchStatementModel.WhereStatement = whereStatement;
     searchStatementModel.SortingStatement = sortingStatement;
     searchStatementModel.Parameters = param.ToArray<object>();
     return searchStatementModel;
 }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:16,代码来源:RegionController.cs


示例9: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, UserSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Anywhere, "u", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("FirstName", searchModel.FirstName, HqlStatementHelper.LikeMatchMode.Anywhere, "u", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("LastName", searchModel.LastName, HqlStatementHelper.LikeMatchMode.Anywhere, "u", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Position", searchModel.Position, HqlStatementHelper.LikeMatchMode.Anywhere, "u", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Depart", searchModel.Depart, HqlStatementHelper.LikeMatchMode.Anywhere, "u", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("IsActive", searchModel.IsActive, "u", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Type", searchModel.Type, "u", ref whereStatement, param);

            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "LanguageDescription")
                {
                    command.SortDescriptors[0].Member = "Language";
                }
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:druidwang,项目名称:Les_parts,代码行数:32,代码来源:UserController.cs


示例10: _AjaxScheduleLineItem

        public ActionResult _AjaxScheduleLineItem(GridCommand command)
        {
           com.Sconit.Entity.ACC.User user = SecurityContextHolder.Get();
            string whereStatement = "where exists ("+
             " select 1 from UserPermissionView as p where p.UserId =" + user.Id + " and p.PermissionCode=s.Supplier)";
                
            IList<object> param = new List<object>();
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = "select count(*) from ScheduleLineItem as s ";
            searchStatementModel.SelectStatement = "select s from ScheduleLineItem as s";
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();
            GridModel<ScheduleLineItem> grid = GetAjaxPageData<ScheduleLineItem>(searchStatementModel, command);
            if (grid.Data != null && grid.Data.Count() > 0)
            {
                var items = grid.Data.Select(o => o.Item).ToArray();
                IList<Item> itemList = new List<Item>();

                string hql = string.Empty;
                IList<object> parm = new List<object>();

                foreach (string itemCode in items.Distinct())
                {
                    if (hql == string.Empty)
                    {
                        hql = "from Item where Code in (?";
                    }
                    else
                    {
                        hql += ", ?";
                    }
                    parm.Add(itemCode);
                }
                 itemList = this.genericMgr.FindAll<Item>(hql+")",parm.ToArray());
                 if (itemList != null && itemList.Count > 0)
                 {
                     foreach (ScheduleLineItem scheduleLineItem in grid.Data)
                     {
                         foreach (var item in itemList)
                         {
                             if (scheduleLineItem.Item==item.Code)
                             {
                                 scheduleLineItem.Description = item.Description;
                                 scheduleLineItem.Uom = item.Uom;
                                 scheduleLineItem.ReferenceCode = item.ReferenceCode;
                                 scheduleLineItem.UnitCount = item.UnitCount;
                             
                             }
                         }
                     }
                 }
            }
            return PartialView(grid);
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:56,代码来源:SupplierSchedulingController.cs


示例11: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, BillMasterSearchModel searchModel)
        {
            string whereStatement = string.Empty;
            IList<object> param = new List<object>();

            SecurityHelper.AddBillPermissionStatement(ref whereStatement, "b", "Party", com.Sconit.CodeMaster.BillType.Distribution);

            HqlStatementHelper.AddLikeStatement("ExternalBillNo", searchModel.ExternalBillNo, HqlStatementHelper.LikeMatchMode.Start, "b", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("BillNo", searchModel.BillNo, HqlStatementHelper.LikeMatchMode.Start, "b", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Party", searchModel.Party, "b", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Status", searchModel.Status, "b", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Type", (int)Sconit.CodeMaster.BillType.Distribution, "b", ref whereStatement, param);

            if (searchModel.StartTime != null & searchModel.EndTime != null)
            {
                HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartTime, searchModel.EndTime, "b", ref whereStatement, param);
            }
            else if (searchModel.StartTime != null & searchModel.EndTime == null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartTime, "b", ref whereStatement, param);
            }
            else if (searchModel.StartTime == null & searchModel.EndTime != null)
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndTime, "b", ref whereStatement, param);
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by b.CreateDate desc";
            }
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:39,代码来源:DistributionBillController.cs


示例12: PreparePickListSearchStatement

        private SearchStatementModel PreparePickListSearchStatement(GridCommand command, OrderMasterSearchModel searchModel)
        {
            string whereStatement = string.Empty;
            if (searchModel.Type.HasValue && searchModel.Type > 0)
            {
                whereStatement = " where o.Type =" + searchModel.Type
                    + " and o.IsShipScanHu = 1 and o.Status in (" + (int)com.Sconit.CodeMaster.OrderStatus.InProcess + "," + (int)com.Sconit.CodeMaster.OrderStatus.Submit + ")"
                    + " and exists (select 1 from OrderDetail as d where d.PickedQty < d.OrderedQty and d.OrderNo = o.OrderNo) ";
            }
            else
            {
                whereStatement = " where o.Type in (" + (int)com.Sconit.CodeMaster.OrderType.Distribution + ","
                   + (int)com.Sconit.CodeMaster.OrderType.Transfer + ","
                   + (int)com.Sconit.CodeMaster.OrderType.SubContractTransfer + ")"
                   + " and o.IsShipScanHu = 1 and o.Status in (" + (int)com.Sconit.CodeMaster.OrderStatus.InProcess + "," + (int)com.Sconit.CodeMaster.OrderStatus.Submit + ")"
                   + " and exists (select 1 from OrderDetail as d where d.PickedQty < d.OrderedQty and d.OrderNo = o.OrderNo) ";
            }
            IList<object> param = new List<object>();
            if (!string.IsNullOrEmpty(searchModel.OrderNo))
            {
                HqlStatementHelper.AddLikeStatement("OrderNo", searchModel.OrderNo, HqlStatementHelper.LikeMatchMode.Start, "o", ref whereStatement, param);
            }
            if (!string.IsNullOrEmpty(searchModel.Flow))
            {
                HqlStatementHelper.AddEqStatement("Flow", searchModel.Flow, "o", ref whereStatement, param);
            }
            if (!string.IsNullOrEmpty(searchModel.PartyFrom))
            {
                HqlStatementHelper.AddEqStatement("PartyFrom", searchModel.PartyFrom, "o", ref whereStatement, param);
            }
            if (!string.IsNullOrEmpty(searchModel.PartyTo))
            {
                HqlStatementHelper.AddEqStatement("PartyTo", searchModel.PartyTo, "o", ref whereStatement, param);
            }

            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by o.CreateDate desc";
            }
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectOrderCountStatement;
            searchStatementModel.SelectStatement = selectOrderStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();
            return searchStatementModel;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:48,代码来源:PickListController.cs


示例13: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, LocationDetailPrefSearchModel searchModel)
        {
            string whereStatement = string.Empty;
            IList<object> param = new List<object>();

            HqlStatementHelper.AddEqStatement("Item", searchModel.ItemCode, "f", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Location", searchModel.LocationCode, "f", ref whereStatement, param);
           
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:19,代码来源:LocationDetailPrefController.cs


示例14: PrepareSearchStatement

        private SearchStatementModel PrepareSearchStatement(GridCommand command, PickListSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            SecurityHelper.AddPartyFromAndPartyToPermissionStatement(ref whereStatement, "pl", "OrderType", "pl", "PartyFrom", "pl", "PartyTo", com.Sconit.CodeMaster.OrderType.Distribution, false);
            // It should be logic "and" between  checking pemission hql commands  and other search condition(PickListNo,Status...etc)
            //whereStatement = whereStatement.Insert(6, " (") + ")";
            HqlStatementHelper.AddLikeStatement("PickListNo", searchModel.PickListNo, HqlStatementHelper.LikeMatchMode.End, "pl", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("IpNo", searchModel.IpNo, HqlStatementHelper.LikeMatchMode.End, "pl", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Status", searchModel.Status, "pl", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Flow", searchModel.Flow, "pl", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("PartyFrom", searchModel.PartyFrom, "pl", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("PartyTo", searchModel.PartyTo, "pl", ref whereStatement, param);

            if (searchModel.StartTime != null & searchModel.EndTime != null)
            {
                HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartTime, searchModel.EndTime, "pl", ref whereStatement, param);
            }
            else if (searchModel.StartTime != null & searchModel.EndTime == null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartTime, "pl", ref whereStatement, param);
            }
            else if (searchModel.StartTime == null & searchModel.EndTime != null)
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndTime, "pl", ref whereStatement, param);
            }

            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "OrderTypeDescription")
                {
                    command.SortDescriptors[0].Member = "OrderType";
                }
                else if (command.SortDescriptors[0].Member == "OrderStatusDescription")
                {
                    command.SortDescriptors[0].Member = "Status";
                }
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by pl.CreateDate desc";
            }
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = "select count(*) from PickListMaster as pl";
            searchStatementModel.SelectStatement = "select pl from PickListMaster as pl";
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:54,代码来源:PickListController.cs


示例15: PrepareShipSearchStatement

        private SearchStatementModel PrepareShipSearchStatement(GridCommand command, PickListSearchModel searchModel)
        {
            string whereStatement = " where p.Status =" + (int)com.Sconit.CodeMaster.PickListStatus.InProcess;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("PickListNo", searchModel.PickListNo, HqlStatementHelper.LikeMatchMode.Start, "p", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Flow", searchModel.Flow, "p", ref whereStatement, param);

            if (searchModel.StartTime != null & searchModel.EndTime != null)
            {
                HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartTime, searchModel.EndTime, "p", ref whereStatement, param);
            }
            else if (searchModel.StartTime != null & searchModel.EndTime == null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartTime, "p", ref whereStatement, param);
            }
            else if (searchModel.StartTime == null & searchModel.EndTime != null)
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndTime, "p", ref whereStatement, param);
            }

            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "OrderTypeDescription")
                {
                    command.SortDescriptors[0].Member = "OrderType";
                }
                else if (command.SortDescriptors[0].Member == "OrderStatusDescription")
                {
                    command.SortDescriptors[0].Member = "Status";
                }
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by p.CreateDate desc";
            }
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:47,代码来源:PickListController.cs


示例16: PrepareSearchStatement

        /// <summary>
        /// Search Statement
        /// </summary>
        /// <param name="command">Telerik GridCommand</param>
        /// <param name="searchModel">RoutingMaster Search Model</param>
        /// <returns>Search Statement</returns>
        private SearchStatementModel PrepareSearchStatement(GridCommand command, RoutingMasterSearchModel searchModel)
        {
            string whereStatement = string.Empty;

            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("Code", searchModel.Code, HqlStatementHelper.LikeMatchMode.Start, "r", ref whereStatement, param);
            HqlStatementHelper.AddLikeStatement("Name", searchModel.Name, HqlStatementHelper.LikeMatchMode.Start, "r", ref whereStatement, param);
            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "RoutingTimeUnitDescription")
                {
                    command.SortDescriptors[0].Member = "TaktTimeUnit";
                }
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:32,代码来源:RoutingController.cs


示例17: RoutingDetailPrepareSearchStatement

        /// <summary>
        /// Search Statement
        /// </summary>
        /// <param name="command">Telerik GridCommand</param>
        /// <param name="searchModel">RoutingDetail Search Model</param>
        /// <param name="routingMasterCode">routingMaster Code</param>
        /// <returns>Search Statement</returns>
        private SearchStatementModel RoutingDetailPrepareSearchStatement(GridCommand command, RoutingDetailSearchModel searchModel, string routingMasterCode)
        {
            string whereStatement = "where r.Routing = '" + routingMasterCode + "'";
            IList<object> param = new List<object>();
            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "TimeUnitDescription")
                {
                    command.SortDescriptors[0].Member = "TimeUnit";
                }
            }

            HqlStatementHelper.AddEqStatement("Operation", searchModel.Operation, "r", ref whereStatement, param);
            
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = routingDetailSelectCountStatement;
            searchStatementModel.SelectStatement = routingDetailSelectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();
            return searchStatementModel;
        }
开发者ID:zhsh1241,项目名称:Sconit5_Shenya,代码行数:30,代码来源:RoutingController.cs


示例18: ConcessionMasterPrepareSearchStatement

        private SearchStatementModel ConcessionMasterPrepareSearchStatement(GridCommand command, ConcessionMasterSearchModel searchModel)
        {
            string whereStatement = string.Empty;
            IList<object> param = new List<object>();

            HqlStatementHelper.AddLikeStatement("ConcessionNo", searchModel.ConcessionNo, HqlStatementHelper.LikeMatchMode.Start, "c", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("Status", searchModel.Status, "c", ref whereStatement, param);
            HqlStatementHelper.AddEqStatement("CreateUserName", searchModel.CreateUserName, "c", ref whereStatement, param);
            if (searchModel.StartDate != null & searchModel.EndDate != null)
            {
                HqlStatementHelper.AddBetweenStatement("CreateDate", searchModel.StartDate, searchModel.EndDate, "c", ref whereStatement, param);
            }
            else if (searchModel.StartDate != null & searchModel.EndDate == null)
            {
                HqlStatementHelper.AddGeStatement("CreateDate", searchModel.StartDate, "c", ref whereStatement, param);
            }
            else if (searchModel.StartDate == null & searchModel.EndDate != null)
            {
                HqlStatementHelper.AddLeStatement("CreateDate", searchModel.EndDate, "c", ref whereStatement, param);
            }
            if (command.SortDescriptors.Count > 0)
            {
                if (command.SortDescriptors[0].Member == "ConcessionStatusDescription")
                {
                    command.SortDescriptors[0].Member = "Status";
                }
            }
            string sortingStatement = HqlStatementHelper.GetSortingStatement(command.SortDescriptors);
            if (command.SortDescriptors.Count == 0)
            {
                sortingStatement = " order by c.CreateDate desc";
            }

            SearchStatementModel searchStatementModel = new SearchStatementModel();
            searchStatementModel.SelectCountStatement = selectCountStatement;
            searchStatementModel.SelectStatement = selectStatement;
            searchStatementModel.WhereStatement = whereStatement;
            searchStatementModel.SortingStatement = sortingStatement;
            searchStatementModel.Parameters = param.ToArray<object>();

            return searchStatementModel;
        }
开发者ID:Novthirteen,项目名称:sih-les,代码行数:42,代码来源:ConcessionOrderController.cs


示例19: PrepareBindSearchStatement

        private SearchStatementModel PrepareBindSearchStatement(GridCommand command, FlowBindModel searchModel, strin 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# SI.SAPInterfaceSearchModel类代码示例发布时间:2022-05-26
下一篇:
C# SmartDeviceRef.User类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap