⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 smgpbody_submit.cs

📁 这个是基于SMPP的开发源码
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

namespace SMGP3_0
{
	public class SMGPBody_Submit : SMGPBody
	{
		public override UInt32 PackID
		{
			get { return 0x00000002; }
		}

		public SMGPBody_Submit()
		{
			Add(new SMPP.Variable.Integer8());// 0	MsgType
			Add(new SMPP.Variable.Integer8());// 1	NeedReport
			Add(new SMPP.Variable.Integer8());// 2	Priority
			Add(new SMPP.Variable.String(10));// 3	ServiceID
			Add(new SMPP.Variable.String(2));//  4	FeeType
			Add(new SMPP.Variable.String(6));//  5	FeeCode
			Add(new SMPP.Variable.String(6));//  6	FixedFee
			Add(new SMPP.Variable.Encoding());// 7	MsgFormat
			Add(new SMPP.Variable.String(17));// 8	ValidTime
			Add(new SMPP.Variable.String(17));// 9	AtTime
			Add(new SMPP.Variable.String(21));//10	SrcTermID
			Add(new SMPP.Variable.String(21));//11	ChargeTermID
			Add(new SMPP.Variable.Integer8());//12	DestTermIDCount
			Add(new SMPP.Variable.VARString(12, System.Text.Encoding.ASCII, 21));//13	DestTermID
			Add(new SMPP.Variable.Integer8());//14	MsgLength
			Add(new SMPP.Variable.VARBinary(14));// 15	MsgContent
			Add(new SMPP.Variable.Binary(8));// 16	Reserve

			Add(new SMPP.TLVPack());// 17	TLVFields
		}

		/// <summary>
		/// 短消息类型
		/// </summary>
		public byte MsgType
		{
			get
			{
				return (this[0] as SMPP.Variable.Integer8).Value;
			}
			set
			{
				(this[0] as SMPP.Variable.Integer8).Value = value;
			}
		}

		/// <summary>
		/// 是否需要状态报告
		/// </summary>
		public byte NeedReport
		{
			get
			{
				return (this[1] as SMPP.Variable.Integer8).Value;
			}
			set
			{
				(this[1] as SMPP.Variable.Integer8).Value = value;
			}
		}

		/// <summary>
		/// 短消息优先级
		/// </summary>
		public byte Priority
		{
			get
			{
				return (this[2] as SMPP.Variable.Integer8).Value;
			}
			set
			{
				(this[2] as SMPP.Variable.Integer8).Value = value;
			}
		}

		/// <summary>
		/// 业务代码
		/// </summary>
		public string ServiceID
		{
			get
			{
				return (this[3] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[3] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 收费类型
		/// </summary>
		public string FeeType
		{
			get
			{
				return (this[4] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[4] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 按条费用
		/// </summary>
		public string FeeCode
		{
			get
			{
				return (this[5] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[5] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 包月费/封顶费
		/// </summary>
		public string FixedFee
		{
			get
			{
				return (this[6] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[6] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 短消息格式
		/// </summary>
		public byte MsgFormat
		{
			get
			{
				return (this[7] as SMPP.Variable.Encoding).Value;
			}
			set
			{
				(this[7] as SMPP.Variable.Encoding).Value = value;
			}
		}

		/// <summary>
		/// 短消息有效时间
		/// </summary>
		public string ValidTime
		{
			get
			{
				return (this[8] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[8] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 短消息定时发送时间
		/// </summary>
		public string AtTime
		{
			get
			{
				return (this[9] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[9] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 短消息发送方号码
		/// </summary>
		public string SrcTermID
		{
			get
			{
				return (this[10] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[10] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 计费用户号码
		/// </summary>
		public string ChargeTermID
		{
			get
			{
				return (this[11] as SMPP.Variable.String).Value;
			}
			set
			{
				(this[11] as SMPP.Variable.String).Value = value;
			}
		}

		/// <summary>
		/// 短消息接收号码总数
		/// </summary>
		public byte DestTermIDCount
		{
			get
			{
				return (this[12] as SMPP.Variable.Integer8).Value;
			}
			set
			{
				(this[12] as SMPP.Variable.Integer8).Value = value;
			}
		}

		/// <summary>
		/// 短消息接收号码
		/// </summary>
		public string DestTermID
		{
			get
			{
				return (this[13] as SMPP.Variable.VARString).Value;
			}
			set
			{
				(this[13] as SMPP.Variable.VARString).Value = value;
			}
		}

		/// <summary>
		/// 短消息长度
		/// </summary>
		public byte MsgLength
		{
			get
			{
				return (this[14] as SMPP.Variable.Integer8).Value;
			}
			set
			{
				(this[14] as SMPP.Variable.Integer8).Value = value;
			}
		}

		/// <summary>
		/// 短消息内容
		/// </summary>
		public byte[] MsgContent
		{
			get
			{
				return (this[15] as SMPP.Variable.VARBinary).Value;
			}
			set
			{
				(this[15] as SMPP.Variable.VARBinary).Value = value;
			}
		}

		/// <summary>
		/// 保留
		/// </summary>
		public byte[] Reserve
		{
			get
			{
				return (this[16] as SMPP.Variable.Binary).Value;
			}
			set
			{
				(this[16] as SMPP.Variable.Binary).Value = value;
			}
		}

		/// <summary>
		/// 可选参数
		/// </summary>
		public SMPP.TLVPack TLVFields
		{
			get
			{
				return this[17] as SMPP.TLVPack;
			}
		}

	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -