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

C# Common.SelectModel类代码示例

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

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



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

示例1: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int status, string key, string exchangeCode)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "E.ExchangeId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " ExchangeId,ExchangeName,ExchangeCode,bd.StatusName ";
            select.TableName = " dbo.Exchange e inner join dbo.BDStatusDetail bd on e.ExchangeStatus = bd.DetailId ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" bd.StatusId = 1 ");

            if (status > 0)
                sb.AppendFormat(" and ExchangeStatus = {0}", status);
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and ExchangeName like '%{0}%'", key);
            if (!string.IsNullOrEmpty(exchangeCode))
                sb.AppendFormat(" and ExchangeCode like '%{0}%'", exchangeCode);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:37,代码来源:ExchangeBLL.cs


示例2: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="assetName"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int status, string assetName)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "a.AssetId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " a.AssetName,a.MUId,a.AssetStatus,a.AssetId,bd.StatusName,mu.MUName as MUName,a.AmountPerHand ";
            select.TableName = " dbo.Asset a left join BDStatusDetail bd on a.AssetStatus=bd.DetailId left join dbo.MeasureUnit mu on a.MUId=mu.MUId and bd.StatusId = 1";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" bd.StatusId = 1 ");

            if (status > 0)
                sb.AppendFormat(" and  a.AssetStatus = {0}", status);
            if (!string.IsNullOrEmpty(assetName))
                sb.AppendFormat(" and a.AssetName like '%{0}%'", assetName);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:35,代码来源:AssetBLL.cs


示例3: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, string key, int status)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "r.RoleId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " r.RoleId,r.RoleName,r.RoleStatus,bd.StatusName  ";
            select.TableName = string.Format(" dbo.Role r left join NFMT_Basic.dbo.BDStatusDetail bd on bd.DetailId = r.RoleStatus and bd.StatusId = {0} ", (int)Common.StatusTypeEnum.通用状态);

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" 1=1 ");
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and r.RoleName like '%{0}%'", key);
            if (status>0)
                sb.AppendFormat(" and r.RoleStatus = {0}", status);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:33,代码来源:RoleBLL.cs


示例4: GetSelectModel

        /// <summary>
        /// 分页获取查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="rateDate"></param>
        /// <param name="currency1"></param>
        /// <param name="currency2"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, DateTime rateDate, int currency1, int currency2)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "r.RateId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = "r.RateId,r.CreateTime,c1.CurrencyName as CurrencyName_1,r.RateValue,c2.CurrencyName as CurrencyName_2,bd.StatusName ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" dbo.Rate r ");
            sb.Append(" left join dbo.Currency c1 on r.FromCurrencyId = c1.CurrencyId ");
            sb.Append(" left join dbo.Currency c2 on r.ToCurrencyId = c2.CurrencyId ");
            sb.AppendFormat(" left join dbo.BDStatusDetail bd on bd.DetailId = r.RateStatus and bd.StatusId = {0} ", (int)Common.StatusTypeEnum.通用状态);
            select.TableName = sb.ToString();

            sb.Clear();

            sb.Append(" 1=1 ");

            if (currency1 > 0)
                sb.AppendFormat(" r.FromCurrencyId = {0} ", currency1);
            if (currency2 > 0)
                sb.AppendFormat(" r.ToCurrencyId = {0} ", currency2);
            if (rateDate > Common.DefaultValue.DefaultTime)
                sb.AppendFormat(" and r.CreateTime between '{0}' and '{1}' ", rateDate.ToString(), rateDate.AddDays(1).ToString());

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:45,代码来源:RateBLL.cs


示例5: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <param name="corpId"></param>
        /// <param name="empIdFrom"></param>
        /// <param name="empIdTo"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, string key, int corpId, int empIdFrom)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();
            int dataStatus = (int)Common.StatusEnum.已生效;

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "C.ContactId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " C.ContactId,C.ContactName,C.ContactCode,C.ContactTel,C.ContactFax,C.ContactAddress,Co.CorpName,BD.StatusName,e.ECId ";
            select.TableName = string.Format(" dbo.Contact C left join dbo.Corporation Co on C.CompanyId = Co.CorpId left join NFMT_Basic.dbo.BDStatusDetail BD on BD.DetailId = C.ContactStatus left join dbo.EmployeeContact e on C.ContactId = e.ContactId and e.EmpId = {0} and e.RefStatus = {1} ", empIdFrom, (int)Common.StatusEnum.已生效);

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" 1=1 ");

            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and C.ContactName like '%{0}%'", key);
            if (corpId > 0)
                sb.AppendFormat(" and C.CompanyId = {0}", corpId);
            if (empIdFrom > 0)
                sb.AppendFormat(" and C.ContactId in (select ContactId from dbo.EmployeeContact where EmpId = {0} and RefStatus = {1}) ", empIdFrom, dataStatus);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:41,代码来源:ContactBLL.cs


示例6: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int status, string key)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "C.CurrencyId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " C.CurrencyId,C.CurrencyName,C.CurencyShort,BD.StatusName,C.CurrencyFullName,C.CurrencyStatus  ";
            select.TableName = " dbo.Currency C left join dbo.BDStatusDetail BD on C.CurrencyStatus = BD.DetailId ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" BD.StatusId = 1");

            if (status > 0)
                sb.AppendFormat(" and C.CurrencyStatus = {0}", status);
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and C.CurrencyName like '%{0}%'", key);
            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:34,代码来源:CurrencyBLL.cs


示例7: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="exchange"></param>
        /// <param name="firstTradeDate"></param>
        /// <param name="lastTradeDate"></param>
        /// <param name="asset"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, DateTime firstTradeDate, DateTime lastTradeDate, int exchageId, int selFuturesCodeStatus)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "fc.FuturesCodeId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " FuturesCodeId,ec.ExchangeName as ExchangeName,FirstTradeDate,LastTradeDate,CONVERT(varchar(20),Convert(int,CodeSize))+mu.MUName as CodeSize,c.CurrencyName as CurrencyName,FuturesCodeStatus,TradeCode,bd.StatusName as StatusName,fc.AssetId,ass.AssetName  ";
            select.TableName = "  dbo.FuturesCode  fc " +
                                                 " inner join dbo.Exchange ec on fc.ExchageId=ec.ExchangeId" +
                                                 " inner join dbo.MeasureUnit mu on fc.MUId=mu.MUId" +
                                                 " inner join dbo.Asset ass on ass.AssetId=fc.AssetId" +
                                                 " inner join dbo.Currency c on fc.CurrencyId =c.CurrencyId" +
                                                 " inner join dbo.BDStatusDetail bd on fc.FuturesCodeStatus=bd.DetailId ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" bd.StatusId = 1 ");

            if (selFuturesCodeStatus > 0)
                sb.AppendFormat(" and FuturesCodeStatus = {0}", selFuturesCodeStatus);
            if (exchageId > 0)
                sb.AppendFormat(" and ExchageId = {0}", exchageId);
            if (firstTradeDate > NFMT.Common.DefaultValue.DefaultTime)
                sb.AppendFormat(" and FirstTradeDate >= '{0}'", firstTradeDate);
            if (lastTradeDate > NFMT.Common.DefaultValue.DefaultTime)
                sb.AppendFormat(" and LastTradeDate <= '{0}'", lastTradeDate);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:47,代码来源:FuturesCodeBLL.cs


示例8: GetSelectModel

        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int status, string key, int bankeStatus, int capitalType, string bankEname)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "BankId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " B.BankId,B.BankName,B.BankEname,B.BankFullName,B.BankShort,B.CapitalType,B.BankStatus,bd.StatusName,sd.DetailName,bt.BankName as ParentBankName,B.ParentId,case ISNULL(B.SwitchBack,0) when 0 then '否' when 1 then '是' end as SwitchBack ";
            select.TableName = "  dbo.Bank B left join dbo.BDStatusDetail bd on B.BankStatus = bd.DetailId left join dbo.BDStyleDetail sd on sd.StyleDetailId=B.CapitalType left join Bank bt on bt.BankId=B.ParentId ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" bd.StatusId = 1 ");

            if (status > 0)
                sb.AppendFormat(" and  B.BankStatus = {0}", status);
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and B.BankFullName like '%{0}%'", key);
            if (capitalType > 0)
                sb.AppendFormat(" and  B.CapitalType = {0}", capitalType);
            if (!string.IsNullOrEmpty(bankEname))
                sb.AppendFormat(" and B.BankEname like '%{0}%'", bankEname);
            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:29,代码来源:BankBLL.cs


示例9: GetCashSelectModel

        public SelectModel GetCashSelectModel(int pageIndex, int pageSize, string orderStr, int pledgeApplyId)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "psd.ContractNo desc";
            else
                select.OrderStr = orderStr;

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" psd.ContractNo as StockContractNo,psd.Deadline,SUM(Hands) as Hands,bank.BankName as AccountName ");
            select.ColumnName = sb.ToString();

            sb.Clear();
            sb.Append(" dbo.Fin_PledgeApply pa ");
            sb.AppendFormat(" inner join dbo.Fin_PledgeApplyStockDetail psd on pa.PledgeApplyId = psd.PledgeApplyId and psd.DetailStatus ={0} ", (int)Common.StatusEnum.已生效);
            sb.Append(" left join NFMT_Basic..Bank bank on pa.FinancingBankId = bank.BankId ");
            select.TableName = sb.ToString();

            sb.Clear();
            sb.AppendFormat(" pa.PledgeApplyId ={0} group by psd.ContractNo,psd.Deadline,bank.BankName ", pledgeApplyId);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:28,代码来源:PledgeApplyCashDetailBLL.cs


示例10: GetSelectModel

        public Common.SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr,int priceConfirmId)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "detail.DetailId desc";
            else
                select.OrderStr = orderStr;

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("detail.DetailId,detail.PriceConfirmId,detail.InterestStartDate,detail.InterestEndDate,CONVERT(varchar,detail.InterestDay) + '天' as InterestDayName,detail.InterestDay,detail.InterestUnit,CONVERT(varchar,detail.InterestUnit)+mu.MUName as InterestUnitName");
            select.ColumnName = sb.ToString();

            sb.Clear();
            sb.Append(" dbo.Pri_PriceConfirmDetail detail ");
            sb.Append(" left join dbo.Pri_PriceConfirm pc on detail.PriceConfirmId = pc.PriceConfirmId ");
            sb.Append(" left join dbo.Con_Contract con on pc.ContractId = con.ContractId ");
            sb.Append(" left join NFMT_Basic..MeasureUnit mu on con.UnitId = mu.MUId ");
            select.TableName = sb.ToString();

            sb.Clear();
            sb.AppendFormat(" detail.PriceConfirmId = {0} and detail.DetailStatus = {1} ", priceConfirmId, (int)Common.StatusEnum.已生效);
            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:28,代码来源:PriceConfirmDetailBLL.cs


示例11: GetSelectModel

        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, string typeName, int status)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "SmsTypeId asc";
            else
                select.OrderStr = orderStr;

            int statusId = (int)Common.StatusTypeEnum.通用状态;

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" SmsTypeId,TypeName,ListUrl,ViewUrl,SmsTypeStatus,bd.StatusName ");
            select.ColumnName = sb.ToString();

            sb.Clear();
            sb.Append(" dbo.Sm_SmsType st  ");
            sb.AppendFormat(" left join NFMT_Basic.dbo.BDStatusDetail bd on st.SmsTypeStatus = bd.DetailId and bd.StatusId = {0} ", statusId);
            select.TableName = sb.ToString();

            sb.Clear();
            sb.Append(" 1=1 ");
            if (!string.IsNullOrEmpty(typeName))
                sb.AppendFormat(" and TypeName like '%{0}%' ", typeName);
            if (status > 0)
                sb.AppendFormat(" and SmsTypeStatus = {0} ", status);
            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:32,代码来源:SmsTypeBLL.cs


示例12: GetCanSalesSelect

        /// <summary>
        /// 可配货库存列表
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <returns></returns>
        public SelectModel GetCanSalesSelect(int pageIndex, int pageSize, string orderStr, string sids = "", int contractId = 0, int StockApplyId = 0, string dids = "", string refNo = "", int ownCorpId = 0)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "sto.StockId asc";
            else
                select.OrderStr = orderStr;

            if (string.IsNullOrEmpty(dids))
                dids = "0";

            int readyStatus = (int)Common.StatusEnum.已生效;

            select.ColumnName = "sto.StockId,sn.RefNo,sto.UintId,sto.CurNetAmount,mu.MUName,sto.StockStatus,sd.StatusName,sto.CorpId,cor.CorpName,sto.AssetId,ass.AssetName,sto.BrandId,bra.BrandName,soad.ApplyAmount,ISNULL(sto.CurNetAmount,0) - ISNULL(soad.ApplyAmount,0) as LastAmount,ISNULL(sto.CurNetAmount,0) - ISNULL(soad.ApplyAmount,0) as NetAmount,sto.Bundles - isnull(soad.ApplyBundles,0) as LaveBundles,sto.Bundles - isnull(soad.ApplyBundles,0) as Bundles,dp.DPName,sto.CardNo ";

            int statusId = (int)Common.StatusTypeEnum.库存状态;
            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" dbo.St_Stock sto ");
            sb.AppendFormat(" inner join NFMT.dbo.Con_Contract con on con.AssetId = sto.AssetId and con.UnitId = sto.UintId and con.ContractId = {0} ", contractId);
            sb.Append(" inner join dbo.St_StockName sn on sto.StockNameId = sn.StockNameId ");
            sb.AppendFormat(" left join NFMT_Basic.dbo.BDStatusDetail sd on sd.DetailId = sto.StockStatus and sd.StatusId ={0} ", statusId);
            sb.Append(" left join NFMT_User.dbo.Corporation cor on cor.CorpId = sto.CorpId ");
            sb.Append(" left join NFMT_Basic.dbo.Asset ass on ass.AssetId = sto.AssetId ");
            sb.Append(" left join NFMT_Basic.dbo.Brand bra on bra.BrandId = sto.BrandId ");
            sb.Append(" left join NFMT_Basic.dbo.DeliverPlace dp on dp.DPId = sto.DeliverPlaceId ");
            sb.Append(" left join NFMT_Basic.dbo.MeasureUnit mu on mu.MUId = sto.UintId ");

            sb.AppendFormat("left join (select sum(NetAmount) as ApplyAmount,sum(Bundles) as ApplyBundles,StockId from NFMT.dbo.St_StockOutApplyDetail where DetailStatus ={0} and DetailId not in ({1}) group by StockId) as soad on soad.StockId = sto.StockId", readyStatus, dids);
            select.TableName = sb.ToString();

            sb.Clear();

            int planStockInStatus = (int)StockStatusEnum.预入库存;
            int planCustomsStatus = (int)StockStatusEnum.新拆库存;

            sb.AppendFormat(" sto.StockStatus between {0} and {1} ", planStockInStatus, planCustomsStatus);
            sb.AppendFormat(" and ISNULL(sto.CurNetAmount,0) - ISNULL(soad.ApplyAmount,0) > 0 ");
            if (StockApplyId > 0)
            {
                sb.AppendFormat(" and sto.StockId not in (select StockId from dbo.St_StockOutApplyDetail where StockOutApplyId ={0} and DetailStatus ={1} ) ", StockApplyId, readyStatus);
            }
            if (!string.IsNullOrEmpty(sids))
            {
                sids = sids.Trim();
                sb.AppendFormat(" and sto.StockId not in ({0})", sids);
            }

            if (!string.IsNullOrEmpty(refNo))
                sb.AppendFormat(" and sn.RefNo like '%{0}%'", refNo);

            if (ownCorpId > 0)
                sb.AppendFormat(" and sto.CorpId={0} ", ownCorpId);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:67,代码来源:StockBLL.cs


示例13: GetSelectModel

        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int masterId, bool isHas = false, string clauseText = "")
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();
            int status = (int)NFMT.Common.StatusEnum.已生效;

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "cc.ClauseId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " cc.ClauseText,cc.ClauseEnText,ccr.RefId,cc.ClauseId,ccr.Sort,ccr.IsChose ";
            System.Text.StringBuilder sb = new System.Text.StringBuilder();

            if (isHas)
            {
                select.TableName = " dbo.ClauseContract_Ref ccr left join dbo.ContractClause cc on cc.ClauseId = ccr.ClauseId left join dbo.ContractMaster cm on cm.MasterId = ccr.MasterId ";
                sb.AppendFormat(" ccr.RefStatus ={0} and cc.ClauseStatus = {0} ", status);
                sb.AppendFormat(" and ccr.MasterId = {0} ", masterId);
            }
            else
            {
                select.TableName = string.Format(" dbo.ContractClause cc left join dbo.ClauseContract_Ref ccr on ccr.ClauseId = cc.ClauseId and MasterId = {0} and RefStatus = {1}  left join dbo.ContractMaster cm on cm.MasterId = ccr.MasterId ", masterId, status);
                sb.AppendFormat(" ccr.ClauseId is null and cc.ClauseStatus = {0}", status);
                if (!string.IsNullOrEmpty(clauseText))
                    sb.AppendFormat(" and cc.ClauseText like '%{0}%' ", clauseText);
            }

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:33,代码来源:ClauseContractBLL.cs


示例14: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <param name="producerName"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int brandStatus, string key, int producerName)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "BrandId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = "  BrandId,b.ProducerId,pd.ProducerName as ProducerName,BrandName,BrandFullName,BrandInfo,BrandStatus,bd.StatusName as BrandStatusName ";
            select.TableName = " Brand b  inner join dbo.BDStatusDetail bd on b.BrandStatus=bd.DetailId inner join dbo.Producer pd on b.ProducerId=pd.ProducerId ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" bd.StatusId = 1 ");

            if (producerName > 0)
                sb.AppendFormat(" and  b.ProducerId= {0}", producerName);
            if (brandStatus > 0)
                sb.AppendFormat(" and BrandStatus = {0}", brandStatus);
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and BrandName like '%{0}%'", key);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:38,代码来源:BrandBLL.cs


示例15: GetSelectModelForHand

        public SelectModel GetSelectModelForHand(int pageIndex, int pageSize, string orderStr, int pledgeApplyId, int repoApplyId)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "rad.StockDetailId desc";
            else
                select.OrderStr = orderStr;

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" rad.DetailId,rad.StockDetailId,rad.RepoTime,rad.ContractNo,rad.StockId,rad.RefNo,pasd.NetAmount as PledgeNetAmount,pasd.Hands as PledgeHands,pasd.Memo,ISNULL(alStock.AlreadyNetAmount,0) as AlreadyNetAmount,ISNULL(alStock.AlreadyHands,0) as AlreadyHands,rad.AccountName,rad.NetAmount,ROUND(rad.NetAmount/ass.AmountPerHand,0) as Hands,rad.Price,rad.ExpiringDate");
            select.ColumnName = sb.ToString();

            sb.Clear();
            sb.Append(" dbo.Fin_RepoApplyDetail rad ");
            sb.Append(" left join dbo.Fin_PledgeApplyStockDetail pasd on rad.StockDetailId = pasd.StockDetailId ");
            sb.Append(" left join dbo.Fin_PledgeApply pa on pasd.PledgeApplyId = pa.PledgeApplyId ");
            sb.Append(" left join ( ");
            sb.Append(" select StockId,SUM(ISNULL(NetAmount,0)) as AlreadyNetAmount,SUM(ISNULL(Hands,0)) as AlreadyHands ");
            sb.Append(" from dbo.Fin_RepoApplyDetail ");
            sb.AppendFormat(" where DetailStatus >= {0} and RepoApplyId <> {1} ", (int)Common.StatusEnum.已录入, repoApplyId);
            sb.Append(" group by StockId ");
            sb.Append(" ) alStock on rad.StockId = alStock.StockId ");
            sb.Append(" left join NFMT_Basic..Asset ass on ass.AssetId = pa.AssetId ");
            select.TableName = sb.ToString();

            sb.Clear();
            sb.AppendFormat(" rad.RepoApplyId = {0} and rad.DetailStatus = {1} ", repoApplyId, (int)Common.StatusEnum.已生效);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:35,代码来源:RepoApplyDetailBLL.cs


示例16: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int status, string key, int producerArea)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "P.ProducerId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = " P.ProducerId,P.ProducerFullName,P.ProducerName,P.ProducerShort,A.AreaName,BD.StatusName,P.ProducerArea ";
            select.TableName = " dbo.Producer P left join dbo.Area A on P.ProducerArea = A.AreaId left join dbo.BDStatusDetail BD on P.ProducerStatus = BD.DetailId ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" BD.StatusId = 1 ");

            if (status > 0)
                sb.AppendFormat(" and P.ProducerStatus = {0}", status);
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and P.ProducerName like '%{0}%'", key);
            if (producerArea > 0)
                sb.AppendFormat(" and P.ProducerArea = {0}", producerArea);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:37,代码来源:ProducerBLL.cs


示例17: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int status, string key)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "mu.MUId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = "  mu.MUId,mu.MUName,mu.BaseId,bmu.MUName as BaseName,mu.TransformRate,mu.MUStatus,BD.StatusName as MUStatusName ";
            select.TableName = " dbo.MeasureUnit mu left join dbo.MeasureUnit bmu on mu.BaseId = bmu.MUId left join dbo.BDStatusDetail BD on BD.DetailId = mu.MUStatus ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append("  BD.StatusId = 1  ");

            if (status > 0)
                sb.AppendFormat(" and mu.MUStatus = {0}", status);
            if (!string.IsNullOrEmpty(key))
                sb.AppendFormat(" and mu.MUName like '%{0}%'", key);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:35,代码来源:MeasureUnitBLL.cs


示例18: GetSelectModel

        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, int splitDocId)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "sd.DetailId asc";
            else
                select.OrderStr = orderStr;

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" sd.DetailId,sd.NewRefNo,sd.GrossAmount,sd.NetAmount,sd.UnitId,mu.MUName,sd.AssetId,ass.AssetName,sd.Bundles,sd.BrandId,br.BrandName,sd.PaperNo,sd.PaperHolder,e.Name,sd.CardNo,sd.Memo");
            select.ColumnName = sb.ToString();

            sb.Clear();
            sb.Append(" dbo.St_SplitDocDetail sd ");
            //sb.Append(" left join dbo.St_StockName sn on sd.NewRefNoId = sn.StockNameId ");
            sb.Append(" left join NFMT_Basic.dbo.MeasureUnit mu on sd.UnitId = mu.MUId ");
            sb.Append(" left join NFMT_Basic.dbo.Asset ass on sd.AssetId = ass.AssetId ");
            sb.Append(" left join NFMT_Basic.dbo.Brand br on sd.BrandId = br.BrandId ");
            sb.Append(" left join NFMT_User.dbo.Employee e on sd.PaperHolder = e.EmpId ");
            select.TableName = sb.ToString();

            sb.Clear();
            sb.AppendFormat(" sd.SplitDocId = {0} and sd.DetailStatus >= {1} ", splitDocId, (int)Common.StatusEnum.已生效);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:31,代码来源:SplitDocDetailBLL.cs


示例19: GetSelectModel

        /// <summary>
        /// 获取分页查询对象
        /// </summary>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="orderStr"></param>
        /// <param name="status"></param>
        /// <param name="key"></param>
        /// <returns></returns>
        public SelectModel GetSelectModel(int pageIndex, int pageSize, string orderStr, DateTime tradeDate, DateTime deliverDate, string tradeCode)
        {
            NFMT.Common.SelectModel select = new NFMT.Common.SelectModel();

            select.PageIndex = pageIndex;
            select.PageSize = pageSize;
            if (string.IsNullOrEmpty(orderStr))
                select.OrderStr = "FPId desc";
            else
                select.OrderStr = orderStr;

            select.ColumnName = "   FPId,TradeDate,DeliverDate,TradeCode,SettlePrice ";
            select.TableName = " dbo.FuturesPrice ";

            System.Text.StringBuilder sb = new System.Text.StringBuilder();
            sb.Append(" 1=1 ");

            //if (tradeDate!=null)
            //    sb.AppendFormat(" and TradeDate = '{0}'", tradeDate);
            //if (deliverDate!=null)
            //    sb.AppendFormat(" and DeliverDate = '{0}'", deliverDate);
            //if (!string.IsNullOrEmpty(tradeCode))
            //    sb.AppendFormat(" and TradeCode = '{0}'", tradeCode);

            select.WhereStr = sb.ToString();

            return select;
        }
开发者ID:weiliji,项目名称:NFMT,代码行数:37,代码来源:FuturesPriceBLL.cs


示例20: GetCanAllotListSelect

该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Common.UserModel类代码示例发布时间:2022-05-26
下一篇:
C# Common.ResultModel类代码示例发布时间: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