コード例 #1
0
        public List <SPDayReportEntity> CaculateReport(DateTime reportDate, SPSClientEntity clientEntity)
        {
            DataTable dtDown            = AdoNetDb.CaculateReport(reportDate, DayReportType.Down, clientEntity);
            DataTable dtDownNotSycn     = AdoNetDb.CaculateReport(reportDate, DayReportType.DownNotSycn, clientEntity);
            DataTable dtDownSycnFailed  = AdoNetDb.CaculateReport(reportDate, DayReportType.DownSycnFailed, clientEntity);
            DataTable dtDownSycnSuccess = AdoNetDb.CaculateReport(reportDate, DayReportType.DownSycnSuccess, clientEntity);

            List <SPDayReportEntity> spDayReportEntities = new List <SPDayReportEntity>();

            foreach (DataRow dataRow in dtDown.Rows)
            {
                int channelID = (int)dataRow["ChannelID"];
                int clientID  = clientEntity.Id;
                int codeID    = (int)dataRow["CodeID"];

                SPDayReportEntity spDayReport = new SPDayReportEntity();
                spDayReport.ReportDate      = reportDate.Date;
                spDayReport.ChannelID       = this.DataObjectsContainerIocID.SPChannelDataObjectInstance.Load(channelID);
                spDayReport.ClientID        = this.DataObjectsContainerIocID.SPSClientDataObjectInstance.Load(clientID);
                spDayReport.CodeID          = this.DataObjectsContainerIocID.SPCodeDataObjectInstance.Load(codeID);
                spDayReport.DownTotalCount  = FindCountInDataTable(dtDown, channelID, codeID);
                spDayReport.DownSycnSuccess = FindCountInDataTable(dtDownSycnSuccess, channelID, codeID);
                spDayReport.DownNotSycn     = FindCountInDataTable(dtDownNotSycn, channelID, codeID);
                spDayReport.DownSycnFailed  = FindCountInDataTable(dtDownSycnFailed, channelID, codeID);

                spDayReportEntities.Add(spDayReport);
            }

            return(spDayReportEntities);
        }
コード例 #2
0
        public static List <SPRecordWrapper> QueryRecord(SPChannelWrapper channel, SPCodeWrapper code, SPSClientWrapper client, string dataType, DateTime?startDate, DateTime?endDate, List <QueryFilter> filters, string orderByColumnName, bool isDesc)
        {
            SPChannelEntity channelEntity = null;

            if (channel != null)
            {
                channelEntity = channel.Entity;
            }

            SPCodeEntity codeEntity = null;

            if (code != null)
            {
                codeEntity = code.Entity;
            }

            SPSClientEntity clientEntity = null;

            if (client != null)
            {
                clientEntity = client.Entity;
            }

            return(ConvertToWrapperList(businessProxy.QueryRecord(channelEntity, codeEntity, clientEntity, dataType, startDate, endDate, filters, orderByColumnName, isDesc)));
        }
コード例 #3
0
        public List <SPAdReportEntity> GetList_By_SPClientID_SPSClientEntity(SPSClientEntity fkentity)
        {
            NHibernateDynamicQueryGenerator <SPAdReportEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SPCLIENTID.Eq(fkentity));

            return(this.FindListByQueryBuilder(dynamicQueryGenerator));
        }
        public List <SPAdAssignedHistortyEntity> FindAllCLientAssignedAdPack(SPSClientEntity client)
        {
            NHibernateDynamicQueryGenerator <SPAdAssignedHistortyEntity> query = this.GetNewQueryBuilder();

            query.AddWhereClause(PROPERTY_ENDDATE.IsNull());

            query.AddWhereClause(PROPERTY_SPCLIENTID.Eq(client));

            return(FindListByQueryBuilder(query));
        }
        public void RemoveAdAssigned(SPAdPackEntity spAdPackEntity, SPSClientEntity spsClientEntity)
        {
            SPAdAssignedHistortyEntity spAdAssignedHistorty = this.SelfDataObj.FindAssignedHistortybyAdPack(spAdPackEntity);

            if (spAdAssignedHistorty != null)
            {
                spAdAssignedHistorty.EndDate = System.DateTime.Now;

                this.SelfDataObj.Update(spAdAssignedHistorty);
            }
        }
        public static ICriterion Query_ClientAssignedCode(SPSClientEntity client, Property codeProperty)
        {
            DetachedCriteria subQuery = DetachedCriteria.For(typeof(SPClientCodeRelationEntity));

            subQuery.CreateAlias(SPClientCodeRelationEntity.PROPERTY_NAME_CODEID, PROPERTY_CODEID_ALIAS_NAME);

            subQuery.SetProjection(PROPERTY_CODEID_ID.CriterionProperty);

            subQuery.Add(PROPERTY_CLIENTID.Eq(client));

            return(Subqueries.PropertyIn(codeProperty.PropertyName, subQuery));
        }
コード例 #7
0
        public static SPClientCodeRelationEntity NewDefaultCode(SPSClientEntity client, SPCodeEntity code)
        {
            SPClientCodeRelationEntity spClientCodeRelation = new SPClientCodeRelationEntity();

            spClientCodeRelation.ClientID      = client;
            spClientCodeRelation.CodeID        = code;
            spClientCodeRelation.IsEnable      = true;
            spClientCodeRelation.InterceptRate = 0;
            spClientCodeRelation.SyncData      = false;

            return(spClientCodeRelation);
        }
コード例 #8
0
        public List<SPDayReportEntity> QueryReport(DateTime startDate, DateTime endDate, SPSClientEntity clientEntity)
        {
            NHibernateDynamicQueryGenerator<SPDayReportEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            //指定查询条件
            dynamicQueryGenerator.AddWhereClause(PROPERTY_REPORTDATE.Ge(startDate.Date));

            dynamicQueryGenerator.AddWhereClause(PROPERTY_REPORTDATE.Lt(endDate.AddDays(1).Date));

            dynamicQueryGenerator.AddWhereClause(PROPERTY_CLIENTID.Eq(clientEntity));

            return this.FindListByQueryBuilder(dynamicQueryGenerator);
        }
コード例 #9
0
        internal static SPSClientWrapper ConvertEntityToWrapper(SPSClientEntity entity)
        {
            if (entity == null)
            {
                return(null);
            }

            if (entity.Id == 0)
            {
                return(null);
            }

            return(new SPSClientWrapper(entity));
        }
        public List <SPAdPackEntity> FindAllCLientAssignedAdPack(SPSClientEntity client)
        {
            List <SPAdAssignedHistortyEntity> adAssignedHistortys = this.SelfDataObj.FindAllCLientAssignedAdPack(client);

            List <SPAdPackEntity> spads = new List <SPAdPackEntity>();

            foreach (SPAdAssignedHistortyEntity assignedHistorty in adAssignedHistortys)
            {
                if (!spads.Contains(assignedHistorty.SPAdPackID))
                {
                    spads.Add(assignedHistorty.SPAdPackID);
                }
            }

            return(spads);
        }
コード例 #11
0
        public List <SPCodeEntity> FindAllByChannelIDAndClientIDAndMoAndSpNumber(int?channelId, int?clientId, string mo, string spcode)
        {
            SPChannelEntity channel = null;

            if (channelId.HasValue)
            {
                channel = this.DataObjectsContainerIocID.SPChannelDataObjectInstance.Load(channelId.Value);
            }
            SPSClientEntity client = null;

            if (clientId.HasValue)
            {
                client = this.DataObjectsContainerIocID.SPSClientDataObjectInstance.Load(clientId.Value);
            }

            return
                (this.DataObjectsContainerIocID.SPCodeDataObjectInstance.FindAllByChannelIDAndClientIDAndMoAndSpNumber(
                     channel, client, mo, spcode));
        }
        public void ClientAssignedAdPack(SPSClientEntity spsClientEntity, SPAdPackEntity spAdPackEntity, decimal clientPrice)
        {
            SPAdAssignedHistortyEntity spAdAssignedHistorty = this.SelfDataObj.FindAssignedHistortybyAdPack(spAdPackEntity);

            if (spAdAssignedHistorty != null)
            {
                spAdAssignedHistorty.EndDate = System.DateTime.Now;

                this.SelfDataObj.Update(spAdAssignedHistorty);
            }

            SPAdAssignedHistortyEntity newspAdAssignedHistorty = new SPAdAssignedHistortyEntity();

            newspAdAssignedHistorty.SPAdID      = spAdPackEntity.SPAdID.Id;
            newspAdAssignedHistorty.SPAdPackID  = spAdPackEntity;
            newspAdAssignedHistorty.SPClientID  = spsClientEntity;
            newspAdAssignedHistorty.ClientPrice = clientPrice;
            newspAdAssignedHistorty.StartDate   = System.DateTime.Now;
            newspAdAssignedHistorty.CreateAt    = System.DateTime.Now;

            this.SelfDataObj.Save(newspAdAssignedHistorty);
        }
コード例 #13
0
        public SPSClientEntity GetDefaultClient()
        {
            SPSClientEntity defaultClient =
                this.DataObjectsContainerIocID.SPSClientDataObjectInstance.FindDefaultClient();

            if (defaultClient == null)
            {
                int defaultSPClientuserID = SystemUserWrapper.QuickAddUser(SystemConfigConst.Config_SpsDefaultClientname,
                                                                           RoleCodeList.ROLE_CODE_SPDOWNUSER,
                                                                           SystemConfigConst.Config_SysDefaultUserpass,
                                                                           SystemConfigConst.Config_SpsDefaultClientname +
                                                                           SystemConfigConst.Config_SysDefaultUsermail);

                if (defaultSPClientuserID < 0)
                {
                    throw new Exception("Create defaultSPClient failed");
                }

                defaultClient = SPSClientServiceProxy.NewDefaultSPClient(defaultSPClientuserID);

                this.DataObjectsContainerIocID.SPSClientDataObjectInstance.Save(defaultClient);
            }
            return(defaultClient);
        }
コード例 #14
0
        public List <SPDayReportEntity> QueryReport(DateTime startDate, DateTime endDate, SPSClientEntity clientEntity)
        {
            NHibernateDynamicQueryGenerator <SPDayReportEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            //指定查询条件
            dynamicQueryGenerator.AddWhereClause(PROPERTY_REPORTDATE.Ge(startDate.Date));

            dynamicQueryGenerator.AddWhereClause(PROPERTY_REPORTDATE.Lt(endDate.AddDays(1).Date));

            dynamicQueryGenerator.AddWhereClause(PROPERTY_CLIENTID.Eq(clientEntity));

            return(this.FindListByQueryBuilder(dynamicQueryGenerator));
        }
コード例 #15
0
 internal SPSClientWrapper(SPSClientEntity entityObj)
     : base(entityObj)
 {
 }
 public List <SPAdAssignedHistortyEntity> FindAllByOrderByAndFilterAndSPClientID(string orderByColumnName, bool isDesc, SPSClientEntity _sPClientID, PageQueryParams pageQueryParams)
 {
     return(this.SelfDataObj.GetPageList_By_SPClientID_SPSClientEntity(orderByColumnName, isDesc, _sPClientID, pageQueryParams));
 }
 public List <SPAdAssignedHistortyEntity> FindAllBySPClientID(SPSClientEntity _sPClientID)
 {
     return(this.SelfDataObj.GetList_By_SPClientID_SPSClientEntity(_sPClientID));
 }
コード例 #18
0
 public List <SPRecordEntity> FindAllSendRecordByClientAndCodeAndDateRange(SPSClientEntity client, SPCodeEntity code, DateTime startDate, DateTime endDate)
 {
     return(this.SelfDataObj.QueryRecordByPage(null, code, client, "DownNotSycn", startDate, endDate, new List <QueryFilter>(),
                                               SPRecordWrapper.PROPERTY_NAME_CREATEDATE, false));
 }
コード例 #19
0
        private NHibernateDynamicQueryGenerator <SPRecordEntity> BuilderQueryGenerator(SPChannelEntity channel, SPCodeEntity code,
                                                                                       SPSClientEntity client, string dataType,
                                                                                       DateTime?startDate, DateTime?endDate, List <QueryFilter> filters,
                                                                                       string orderByColumnName, bool isDesc)
        {
            var queryBuilder = new NHibernateDynamicQueryGenerator <SPRecordEntity>();

            if (channel != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CHANNELID.Eq(channel));
            }

            if (code != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CODEID.Eq(code));
            }

            if (client != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CLIENTID.Eq(client));
            }

            DayReportType reportType = (DayReportType)Enum.Parse(typeof(DayReportType), dataType);

            SetReportTypeFilter(queryBuilder, reportType);

            if (startDate != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Ge(startDate.Value.Date));
            }

            if (endDate != null)
            {
                queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Lt(endDate.Value.Date.AddDays(1)));
            }


            AddQueryFiltersToQueryGenerator(filters, queryBuilder);

            AddDefaultOrderByToQueryGenerator(orderByColumnName, isDesc, queryBuilder);
            return(queryBuilder);
        }
コード例 #20
0
        public List <SPCodeEntity> FindAllByChannelIDAndClientIDAndMoAndSpNumber(SPChannelEntity channel, SPSClientEntity client, string mo, string spcode)
        {
            NHibernateDynamicQueryGenerator <SPCodeEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            if (channel != null)
            {
                dynamicQueryGenerator.AddWhereClause(SPCodeDataObject.PROPERTY_CHANNELID.Eq(channel));
            }

            if (client != null)
            {
                dynamicQueryGenerator.AddWhereClause(SPClientCodeRelationDataObject.Query_ClientAssignedCode(client, PROPERTY_ID.CriterionProperty));
            }

            if (!string.IsNullOrEmpty(mo))
            {
                dynamicQueryGenerator.AddWhereClause(SPCodeDataObject.PROPERTY_MO.Like(mo, MatchMode.Anywhere));
            }

            if (!string.IsNullOrEmpty(spcode))
            {
                dynamicQueryGenerator.AddWhereClause(SPCodeDataObject.PROPERTY_SPCODE.Like(spcode, MatchMode.Anywhere));
            }

            dynamicQueryGenerator.AddWhereClause(
                Not(SPCodeDataObject.PROPERTY_MOTYPE.Eq(DictionaryConst.Dictionary_CodeType_CodeDefault_Key)));


            dynamicQueryGenerator.AddOrderBy(PROPERTY_MOTYPE.Asc());

            dynamicQueryGenerator.AddOrderBy(PROPERTY_MO.Asc());

            dynamicQueryGenerator.AddOrderBy(PROPERTY_SPCODE.Asc());

            return(this.FindListByQueryBuilder(dynamicQueryGenerator));
        }
コード例 #21
0
        public List <SPAdReportEntity> QueryReport(DateTime startDate, DateTime endDate, SPSClientEntity spsClientEntity)
        {
            NHibernateDynamicQueryGenerator <SPAdReportEntity> query = this.GetNewQueryBuilder();

            //指定查询条件
            query.AddWhereClause(PROPERTY_REPORTDATE.Ge(startDate.Date));

            query.AddWhereClause(PROPERTY_REPORTDATE.Lt(endDate.AddDays(1).Date));

            query.AddWhereClause(PROPERTY_SPCLIENTID.Eq(spsClientEntity));

            return(this.FindListByQueryBuilder(query));
        }
コード例 #22
0
        public DataTable CaculateReport(DateTime reportDate, DayReportType dayReportType, SPSClientEntity clientEntity)
        {
            string sql = "Select [ChannelID],[CodeID],Sum([Count]) as RecordCount from SPRecord with(nolock) where CreateDate >= @startDate and  CreateDate <  @endDate and [ClientID] = @ClientID";

            sql += BuildDayReportTypeFilterSql(dayReportType);

            sql += " group by [ChannelID],[CodeID]";

            DbParameters dbParameters = this.CreateNewDbParameters();

            dbParameters.AddWithValue("startDate", reportDate.Date);

            dbParameters.AddWithValue("endDate", reportDate.Date.AddDays(1));

            dbParameters.AddWithValue("ClientID", clientEntity.Id);

            return(this.ExecuteDataSet(sql, CommandType.Text, dbParameters).Tables[0]);
        }
コード例 #23
0
        public List<SPRecordEntity> QueryRecordByPage(SPChannelEntity channel, SPCodeEntity code, SPSClientEntity client, string dataType, DateTime? startDate, DateTime? endDate, List<QueryFilter> filters, string orderByColumnName, bool isDesc)
        {
            var queryBuilder = BuilderQueryGenerator(channel, code, client, dataType, startDate, endDate, filters, orderByColumnName, isDesc);

            return FindListByQueryBuilder(queryBuilder);
        }
 public List <SPClientCodeRelationEntity> FindAllByClientID(SPSClientEntity _clientID)
 {
     return(this.SelfDataObj.GetList_By_ClientID_SPSClientEntity(_clientID));
 }
コード例 #25
0
 public List <SPRecordEntity> QueryRecordByPage(SPChannelEntity channel, SPCodeEntity code, SPSClientEntity client, string dataType, DateTime?startDate, DateTime?endDate, List <QueryFilter> filters, string orderByColumnName, bool isDesc, PageQueryParams pageQueryParams)
 {
     return(this.SelfDataObj.QueryRecordByPage(channel, code, client, dataType, startDate, endDate, filters,
                                               orderByColumnName, isDesc, pageQueryParams));
 }
コード例 #26
0
        public SPAdReportEntity FindByCilentIDAdPackIDAndReportDate(int?spadId, SPAdPackEntity spPackId, SPSClientEntity spClientId, DateTime?reportDate)
        {
            NHibernateDynamicQueryGenerator <SPAdReportEntity> query = this.GetNewQueryBuilder();

            //指定查询条件
            query.AddWhereClause(PROPERTY_REPORTDATE.Eq(reportDate.Value));

            query.AddWhereClause(PROPERTY_SPCLIENTID.Eq(spClientId));

            query.AddWhereClause(PROPERTY_SPADID.Eq(spadId.Value));

            query.AddWhereClause(PROPERTY_SPPACKID.Eq(spPackId));

            return(this.FindSingleEntityByQueryBuilder(query));
        }
コード例 #27
0
        public void QuickAddSPChannel(SPChannelEntity channelEntity, string pLinkId, string pMo, string pMobile, string pSpCode, string pCreateDate, string pProvince, string pCity, string pExtend1, string pExtend2, string pExtend3, string pExtend4, string pExtend5, string pExtend6, string pExtend7, string pExtend8, string pExtend9, string pExtend10)
        {
            if (string.IsNullOrEmpty(pLinkId))
            {
                throw new ArgumentNullException("pLinkId");
            }
            if (string.IsNullOrEmpty(pMo))
            {
                throw new ArgumentNullException("pMo");
            }
            if (string.IsNullOrEmpty(pLinkId))
            {
                throw new ArgumentNullException("pMobile");
            }
            if (string.IsNullOrEmpty(pMo))
            {
                throw new ArgumentNullException("pSpCode");
            }

            channelEntity.ChannelStatus = DictionaryConst.Dictionary_ChannelStatus_Run_Key;

            this.selfDataObject.Save(channelEntity);

            SPSClientEntity defaultClient = GetDefaultClient();

            SPCodeEntity defaultCode = SPCodeServiceProxy.NewDefaultCode(channelEntity);

            this.DataObjectsContainerIocID.SPCodeDataObjectInstance.Save(defaultCode);

            SPClientCodeRelationEntity spClientCodeRelation =
                SPClientCodeRelationServiceProxy.NewDefaultCode(defaultClient, defaultCode);

            this.DataObjectsContainerIocID.SPClientCodeRelationDataObjectInstance.Save(spClientCodeRelation);



            SPChannelParamsEntity cpLinkId = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pLinkId, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_LinkID_Key), DictionaryConst.Dictionary_SPField_LinkID_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpLinkId);

            SPChannelParamsEntity cpMo = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pMo, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_MO_Key), DictionaryConst.Dictionary_SPField_MO_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpMo);

            SPChannelParamsEntity cpMobile = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pMobile, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_Mobile_Key), DictionaryConst.Dictionary_SPField_Mobile_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpMobile);

            SPChannelParamsEntity cpSpCode = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pSpCode, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_SpNumber_Key), DictionaryConst.Dictionary_SPField_SpNumber_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpSpCode);

            if (!string.IsNullOrEmpty(pCreateDate))
            {
                SPChannelParamsEntity cpCreateDate = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pCreateDate, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_CreateDate_Key), DictionaryConst.Dictionary_SPField_CreateDate_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpCreateDate);
            }

            if (!string.IsNullOrEmpty(pProvince))
            {
                SPChannelParamsEntity cpProvince = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pProvince, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_Province_Key), DictionaryConst.Dictionary_SPField_Province_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpProvince);
            }

            if (!string.IsNullOrEmpty(pCity))
            {
                SPChannelParamsEntity cpCity = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pCity, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_City_Key), DictionaryConst.Dictionary_SPField_City_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpCity);
            }

            if (channelEntity.IsStateReport && !string.IsNullOrEmpty(channelEntity.StateReportParamName))
            {
                SPChannelParamsEntity cpStateReport = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, channelEntity.StateReportParamName, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_State_Key), DictionaryConst.Dictionary_SPField_State_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpStateReport);
            }

            if (!string.IsNullOrEmpty(pExtend1))
            {
                SPChannelParamsEntity cpExtend1 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend1, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField1_Key), DictionaryConst.Dictionary_SPField_ExtendField1_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend1);
            }


            if (!string.IsNullOrEmpty(pExtend2))
            {
                SPChannelParamsEntity cpExtend2 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend2, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField2_Key), DictionaryConst.Dictionary_SPField_ExtendField2_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend2);
            }

            if (!string.IsNullOrEmpty(pExtend3))
            {
                SPChannelParamsEntity cpExtend3 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend3, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField3_Key), DictionaryConst.Dictionary_SPField_ExtendField3_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend3);
            }

            if (!string.IsNullOrEmpty(pExtend4))
            {
                SPChannelParamsEntity cpExtend4 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend4, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField4_Key), DictionaryConst.Dictionary_SPField_ExtendField4_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend4);
            }

            if (!string.IsNullOrEmpty(pExtend5))
            {
                SPChannelParamsEntity cpExtend5 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend5, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField5_Key), DictionaryConst.Dictionary_SPField_ExtendField5_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend5);
            }

            if (!string.IsNullOrEmpty(pExtend6))
            {
                SPChannelParamsEntity cpExtend6 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend6, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField6_Key), DictionaryConst.Dictionary_SPField_ExtendField6_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend6);
            }

            if (!string.IsNullOrEmpty(pExtend7))
            {
                SPChannelParamsEntity cpExtend7 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend7, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField7_Key), DictionaryConst.Dictionary_SPField_ExtendField7_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend7);
            }

            if (!string.IsNullOrEmpty(pExtend8))
            {
                SPChannelParamsEntity cpExtend8 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend8, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField8_Key), DictionaryConst.Dictionary_SPField_ExtendField8_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend8);
            }

            if (!string.IsNullOrEmpty(pExtend9))
            {
                SPChannelParamsEntity cpExtend9 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend1, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField9_Key), DictionaryConst.Dictionary_SPField_ExtendField9_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend9);
            }

            if (!string.IsNullOrEmpty(pExtend10))
            {
                SPChannelParamsEntity cpExtend10 = SPChannelParamsServiceProxy.NewChannelParams(channelEntity, pExtend10, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_ExtendField10_Key), DictionaryConst.Dictionary_SPField_ExtendField10_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

                this.DataObjectsContainerIocID.SPChannelParamsDataObjectInstance.Save(cpExtend10);
            }


            SPChannelSycnParamsEntity linkidSycnParam = SPChannelSycnParamsServiceProxy.NewSPChannelSycnParams(channelEntity, DictionaryConst.Dictionary_SPField_LinkID_Key, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_LinkID_Key), DictionaryConst.Dictionary_SPField_LinkID_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelSycnParamsDataObjectInstance.Save(linkidSycnParam);

            SPChannelSycnParamsEntity moSycnParam = SPChannelSycnParamsServiceProxy.NewSPChannelSycnParams(channelEntity, DictionaryConst.Dictionary_SPField_MO_Key, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_MO_Key), DictionaryConst.Dictionary_SPField_MO_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelSycnParamsDataObjectInstance.Save(moSycnParam);

            SPChannelSycnParamsEntity mobileSycnParam = SPChannelSycnParamsServiceProxy.NewSPChannelSycnParams(channelEntity, DictionaryConst.Dictionary_SPField_Mobile_Key, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_Mobile_Key), DictionaryConst.Dictionary_SPField_Mobile_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelSycnParamsDataObjectInstance.Save(mobileSycnParam);

            SPChannelSycnParamsEntity spCodeSycnParam = SPChannelSycnParamsServiceProxy.NewSPChannelSycnParams(channelEntity, DictionaryConst.Dictionary_SPField_SpNumber_Key, DictionaryConst.ParseSPFieldDictionaryKey(DictionaryConst.Dictionary_SPField_SpNumber_Key), DictionaryConst.Dictionary_SPField_SpNumber_Key, DictionaryConst.Dictionary_ChannelParamsType_Normal_Key);

            this.DataObjectsContainerIocID.SPChannelSycnParamsDataObjectInstance.Save(spCodeSycnParam);
        }
 public List <SPRecordEntity> FindAllByClientID(SPSClientEntity _clientID)
 {
     return(this.SelfDataObj.GetList_By_ClientID_SPSClientEntity(_clientID));
 }
コード例 #29
0
        public List <SPRecordEntity> QueryRecordByPage(SPChannelEntity channel, SPCodeEntity code, SPSClientEntity client, string dataType, DateTime?startDate, DateTime?endDate, List <QueryFilter> filters, string orderByColumnName, bool isDesc, PageQueryParams pageQueryParams)
        {
            var queryBuilder = BuilderQueryGenerator(channel, code, client, dataType, startDate, endDate, filters, orderByColumnName, isDesc);

            return(FindListByPageByQueryBuilder(queryBuilder, pageQueryParams));
        }
コード例 #30
0
 public List <SPDayReportEntity> QueryReport(DateTime startDate, DateTime endDate, SPSClientEntity clientEntity)
 {
     return(SelfDataObj.QueryReport(startDate.Date, endDate.Date, clientEntity));
 }
        public List <SPAdAssignedHistortyEntity> GetPageList_By_SPClientID_SPSClientEntity(string orderByColumnName, bool isDesc, SPSClientEntity fkentity, PageQueryParams pageQueryParams)
        {
            NHibernateDynamicQueryGenerator <SPAdAssignedHistortyEntity> dynamicQueryGenerator = this.GetNewQueryBuilder();

            dynamicQueryGenerator.AddWhereClause(PROPERTY_SPCLIENTID.Eq(fkentity));

            AddDefaultOrderByToQueryGenerator(orderByColumnName, isDesc, dynamicQueryGenerator);

            return(FindListByPageByQueryBuilder(dynamicQueryGenerator, pageQueryParams));
        }
コード例 #32
0
        private NHibernateDynamicQueryGenerator<SPRecordEntity> BuilderQueryGenerator(SPChannelEntity channel, SPCodeEntity code,
            SPSClientEntity client, string dataType,
            DateTime? startDate, DateTime? endDate, List<QueryFilter> filters,
            string orderByColumnName, bool isDesc)
        {
            var queryBuilder = new NHibernateDynamicQueryGenerator<SPRecordEntity>();

            if (channel!=null)
                queryBuilder.AddWhereClause(PROPERTY_CHANNELID.Eq(channel));

            if (code != null)
                queryBuilder.AddWhereClause(PROPERTY_CODEID.Eq(code));

            if (client != null)
                queryBuilder.AddWhereClause(PROPERTY_CLIENTID.Eq(client));

            DayReportType reportType = (DayReportType) Enum.Parse(typeof (DayReportType), dataType);

            SetReportTypeFilter(queryBuilder, reportType);

            if (startDate != null)
                queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Ge(startDate.Value.Date));

            if (endDate != null)
                queryBuilder.AddWhereClause(PROPERTY_CREATEDATE.Lt(endDate.Value.Date.AddDays(1)));

            AddQueryFiltersToQueryGenerator(filters, queryBuilder);

            AddDefaultOrderByToQueryGenerator(orderByColumnName, isDesc, queryBuilder);
            return queryBuilder;
        }
 public List <SPRecordEntity> FindAllByOrderByAndFilterAndClientID(string orderByColumnName, bool isDesc, SPSClientEntity _clientID, PageQueryParams pageQueryParams)
 {
     return(this.SelfDataObj.GetPageList_By_ClientID_SPSClientEntity(orderByColumnName, isDesc, _clientID, pageQueryParams));
 }