コード例 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (X.IsAjaxRequest)
            {
                return;
            }

            SPChannelWrapper channelWrapper = ChannelID;

            if (channelWrapper != null)
            {
                txtName.Text              = channelWrapper.Name;
                txtCode.Text              = channelWrapper.Code;
                txtDescription.Text       = channelWrapper.Description;
                txtDataOkMessage.Text     = channelWrapper.DataOkMessage;
                txtDataFailedMessage.Text = channelWrapper.DataFailedMessage;

                lblDataAdapterType.Text = DictionaryConst.ParseChannelDataAdapterTypeDictionaryKey(channelWrapper.DataAdapterType);
                lblChannelType.Text     = DictionaryConst.ParseChannelTypeDictionaryKey(channelWrapper.ChannelType);

                if (channelWrapper.ChannelType == DictionaryConst.Dictionary_ChannelType_IVRChannel_Key)
                {
                    cmbIVRType.Hidden       = false;
                    txtIVRTimeFormat.Hidden = false;
                    cmbIVRType.Value        = channelWrapper.IVRFeeTimeType;
                    txtIVRTimeFormat.Text   = channelWrapper.IVRTimeFormat;
                }

                if (channelWrapper.IsStateReport)
                {
                    //this.fsIsStateReport.CheckboxToggle = true;
                    this.fsIsStateReport.Collapsed = false;

                    this.rdgStateReportType.SetValue(channelWrapper.StateReportType);

                    this.txtStateReportParamName.Text  = channelWrapper.StateReportParamName;
                    this.txtStateReportParamValue.Text = channelWrapper.StateReportParamValue;

                    this.txtReportOkMessage.Text     = channelWrapper.ReportOkMessage;
                    this.txtReportFailedMessage.Text = channelWrapper.ReportFailedMessage;

                    if (channelWrapper.StateReportType == DictionaryConst.Dictionary_ChannelStateReportType_SendTwiceTypeRequest_Key)
                    {
                        this.txtRequestTypeParamName.Hidden = false;
                        this.txtRequestTypeParamName.Text   = channelWrapper.RequestTypeParamName;

                        this.txtRequestTypeParamDataReportValue.Hidden = false;
                        this.txtRequestTypeParamDataReportValue.Text   = channelWrapper.RequestTypeParamDataReportValue;

                        this.txtRequestTypeParamStateReportValue.Hidden = false;
                        this.txtRequestTypeParamStateReportValue.Text   = channelWrapper.RequestTypeParamStateReportValue;
                    }
                }

                this.chkHasFilters.Checked       = channelWrapper.HasFilters;
                this.chkIsLogRequest.Checked     = channelWrapper.IsLogRequest;
                this.chkIsMonitorRequest.Checked = channelWrapper.IsMonitorRequest;
                this.chkIsParamsConvert.Checked  = channelWrapper.IsParamsConvert;
                this.chkIsAutoLinkID.Checked     = channelWrapper.IsAutoLinkID;

                if (channelWrapper.IsAutoLinkID)
                {
                    this.txtAutoLinkIDFields.Hidden = false;
                    this.txtAutoLinkIDFields.Text   = channelWrapper.AutoLinkIDFields;
                }
            }
        }
コード例 #2
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);
        }