Пример #1
0
 private static void ProduceImage(Dictionary<string, string> model)
 {
     SendText text = new SendText();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "image";
 }
Пример #2
0
 /// <summary>
 ///  生成图文消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="content">The content.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-24 09:57:37
 private static void ProduceNews(Dictionary<string, string> model, string content)
 {
     SendText text = new SendText();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "text";
     text.Content = content;
 }
Пример #3
0
 /// <summary>
 ///  生成文本函数
 /// </summary>
 /// <param name="model">The model.</param>
 /// <param name="content">The content.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-17 14:46:20
 private static void ProduceText(Dictionary<string, string> model, string content)
 {
     SendText text = new SendText();
     text.ToUserName = model.ReadKey(PublicField.FromUserName);
     text.FromUserName = model.ReadKey(PublicField.ToUserName);
     text.CreateTime = int.Parse(model.ReadKey(PublicField.CreateTime));
     text.MsgType = "text";
     text.Content = content;
     OperateXml.ResponseEnd(Templete.SendText(text));
 }
Пример #4
0
 /// <summary>
 ///  回复文本消息
 /// </summary>
 /// <param name="model">The model.</param>
 /// Author  : 俞立钢
 /// Company : 绍兴标点电子技术有限公司
 /// Created : 2014-10-10 11:00:22
 public static string SendText(SendText model)
 {
     return string.Format(@"<xml><ToUserName><![CDATA[{0}]]></ToUserName><FromUserName><![CDATA[{1}]]></FromUserName><CreateTime>{2}</CreateTime><MsgType><![CDATA[{3}]]></MsgType><Content><![CDATA[{4}]]></Content></xml>", model.ToUserName, model.FromUserName, model.CreateTime, model.MsgType, model.Content);
 }