private void cmbChannelList_SelectedIndexChanged(object sender, EventArgs e) { if (cmbChannelList.SelectedValue != null) { SPChannelWrapper channel = cmbChannelList.SelectedValue as SPChannelWrapper; if (channel != null) { ChannelSendSettings channelSetting = new ChannelSendSettings(); channelSetting.SubmitSendUrl = channel.GetInterfaceUrl("http://localhost:55662"); channelSetting.ParamsLinkidName = channel.ChannelParams[DictionaryConst.Dictionary_SPField_LinkID_Key]; channelSetting.ParamsMoName = channel.ChannelParams[DictionaryConst.Dictionary_SPField_MO_Key]; channelSetting.ParamsMobileName = channel.ChannelParams[DictionaryConst.Dictionary_SPField_Mobile_Key]; channelSetting.ParamsSPCodeName = channel.ChannelParams[DictionaryConst.Dictionary_SPField_SpNumber_Key]; channelSetting.DataOkMessage = channel.DataOkMessage; channelSetting.IsStatusReport = channel.IsStateReport; channelSetting.ParamsStatusName = channel.StateReportParamName; channelSetting.RequestType = 0; if (!channel.IsStateReport) { channelSetting.RequestType = 0; } else { if (channel.StateReportType == DictionaryConst.Dictionary_ChannelStateReportType_SendOnce_Key) { channelSetting.RequestType = 0; } else if (channel.StateReportType == DictionaryConst.Dictionary_ChannelStateReportType_SendTwice_Key) { channelSetting.RequestType = 1; } else if (channel.StateReportType == DictionaryConst.Dictionary_ChannelStateReportType_SendTwiceTypeRequest_Key) { channelSetting.RequestType = 2; } } channelSetting.ParamsStatusValue = channel.StateReportParamValue; channelSetting.ParamsRequestTypeDataValue = channel.RequestTypeParamDataReportValue; channelSetting.ParamsRequestTypeName = channel.RequestTypeParamName; channelSetting.ParamsRequestTypeReportValue = channel.RequestTypeParamStateReportValue; channelSetting.ReportOkMesage = channel.ReportOkMessage; this.ucChannelParams1.ChannelSetting = channelSetting; } } }