Exemplo n.º 1
0
        public ActionResult Index()
        {
            RoadFlow.Data.Model.Users currentUser = MyController.CurrentUser;
            base.ViewBag.UserName = ((currentUser == null) ? "" : currentUser.Name);
            base.ViewBag.DateTime = MyController.CurrentDateTime.ToDateWeekString();
            List <RoadFlow.Data.Model.ShortMessage> allNoReadByUserID = new RoadFlow.Platform.ShortMessage().GetAllNoReadByUserID(currentUser.ID);

            if (allNoReadByUserID.Count > 0)
            {
                JsonData jsonData = new JsonData();
                string   empty    = string.Empty;
                RoadFlow.Data.Model.ShortMessage shortMessage = (from p in allNoReadByUserID
                                                                 orderby p.SendTime descending
                                                                 select p).FirstOrDefault();
                empty                      = (shortMessage.LinkUrl.IsNullOrEmpty() ? shortMessage.Contents.RemoveHTML() : ("<a class=\"blue1\" href=\"" + shortMessage.LinkUrl + "\">" + shortMessage.Contents.RemoveHTML() + "</a>"));
                jsonData["title"]          = shortMessage.Title;
                jsonData["contents"]       = empty;
                jsonData["count"]          = allNoReadByUserID.Count;
                base.ViewBag.NoReadMsgJson = jsonData.ToJson();
            }
            string text = base.Url.Content("~/Content/UserHeads/default.jpg");

            if (!currentUser.HeadImg.IsNullOrEmpty() && System.IO.File.Exists(base.Server.MapPath(base.Url.Content("~" + currentUser.HeadImg))))
            {
                text = base.Url.Content("~" + currentUser.HeadImg);
            }
            base.ViewBag.HeadImg = text;
            return(View());
        }
Exemplo n.º 2
0
        public static Guid Send(Guid userID, string userName, string title, string contents, int msgType = 0, string linkUrl = "", string linkID = "", string msgID = "")
        {
            if (userID.IsEmptyGuid() || title.IsNullOrEmpty() || contents.IsNullOrEmpty())
            {
                return(Guid.Empty);
            }
            if (userName.IsNullOrEmpty())
            {
                userName = new Users().GetName(userID);
            }
            RoadFlow.Data.Model.ShortMessage shortMessage = new RoadFlow.Data.Model.ShortMessage();
            shortMessage.Contents        = contents;
            shortMessage.ID              = (msgID.IsGuid() ? msgID.ToGuid() : Guid.NewGuid());
            shortMessage.LinkID          = linkID;
            shortMessage.LinkUrl         = linkUrl;
            shortMessage.ReceiveUserID   = userID;
            shortMessage.ReceiveUserName = userName;
            shortMessage.SendTime        = DateTimeNew.Now;
            shortMessage.SendUserID      = Users.CurrentUserID;
            shortMessage.SendUserName    = Users.CurrentUserName;
            shortMessage.Status          = 0;
            shortMessage.Title           = title;
            shortMessage.Type            = msgType;
            new ShortMessage().Add(shortMessage);
            string empty = string.Empty;

            SiganalR(contents: linkUrl.IsNullOrEmpty() ? shortMessage.Contents : ("<a class=\"blue1\" href=\"" + linkUrl + "\">" + shortMessage.Contents + "</a>"), userID: userID, id: shortMessage.ID.ToString(), title: title);
            return(shortMessage.ID);
        }
Exemplo n.º 3
0
 public ActionResult Send(FormCollection collection)
 {
     if (collection != null)
     {
         string text  = base.Request.Form["Title1"];
         string text2 = base.Request.Form["Contents"];
         string text3 = base.Request.Form["ReceiveUserID"];
         string files = base.Request.Form["Files"];
         string b     = base.Request.Form["sendtoseixin"];
         if (text.IsNullOrEmpty() || text2.IsNullOrEmpty() || text3.IsNullOrEmpty())
         {
             base.ViewBag.script = "alert('数据验证错误!')";
             return(View());
         }
         List <RoadFlow.Data.Model.Users> allUsers = new RoadFlow.Platform.Organize().GetAllUsers(text3);
         StringBuilder stringBuilder  = new StringBuilder();
         StringBuilder stringBuilder2 = new StringBuilder();
         RoadFlow.Data.Model.ShortMessage shortMessage  = null;
         RoadFlow.Platform.ShortMessage   shortMessage2 = new RoadFlow.Platform.ShortMessage();
         foreach (RoadFlow.Data.Model.Users item in allUsers)
         {
             RoadFlow.Data.Model.ShortMessage shortMessage3 = new RoadFlow.Data.Model.ShortMessage();
             shortMessage3.Contents        = text2;
             shortMessage3.ID              = Guid.NewGuid();
             shortMessage3.ReceiveUserID   = item.ID;
             shortMessage3.ReceiveUserName = item.Name;
             shortMessage3.SendTime        = DateTimeNew.Now;
             shortMessage3.SendUserID      = RoadFlow.Platform.Users.CurrentUserID;
             shortMessage3.SendUserName    = RoadFlow.Platform.Users.CurrentUserName;
             shortMessage3.Status          = 0;
             shortMessage3.Title           = text;
             shortMessage3.Type            = 0;
             shortMessage3.Files           = files;
             shortMessage2.Add(shortMessage3);
             RoadFlow.Platform.ShortMessage.SiganalR(item.ID, shortMessage3.ID.ToString(), text, text2.RemoveHTML());
             stringBuilder.Append(item.Name);
             stringBuilder.Append(",");
             stringBuilder2.Append(item.Account);
             stringBuilder2.Append('|');
             if (shortMessage == null)
             {
                 shortMessage = shortMessage3;
             }
         }
         if ("1" == b && shortMessage != null && stringBuilder2.Length > 0)
         {
             shortMessage2.SendToWeiXin(shortMessage, stringBuilder2.ToString().TrimEnd('|'));
         }
         base.ViewBag.script = string.Format("alert('成功将消息发送给了:{0}!');window.location=window.location;", stringBuilder.ToString());
     }
     return(View());
 }
Exemplo n.º 4
0
        private List <RoadFlow.Data.Model.ShortMessage> DataReaderToList(SqlDataReader dataReader)
        {
            List <RoadFlow.Data.Model.ShortMessage> list = new List <RoadFlow.Data.Model.ShortMessage>();

            RoadFlow.Data.Model.ShortMessage shortMessage = null;
            while (dataReader.Read())
            {
                shortMessage       = new RoadFlow.Data.Model.ShortMessage();
                shortMessage.ID    = dataReader.GetGuid(0);
                shortMessage.Title = dataReader.GetString(1);
                if (!dataReader.IsDBNull(2))
                {
                    shortMessage.Contents = dataReader.GetString(2);
                }
                shortMessage.SendUserID      = dataReader.GetGuid(3);
                shortMessage.SendUserName    = dataReader.GetString(4);
                shortMessage.ReceiveUserID   = dataReader.GetGuid(5);
                shortMessage.ReceiveUserName = dataReader.GetString(6);
                shortMessage.SendTime        = dataReader.GetDateTime(7);
                if (!dataReader.IsDBNull(8))
                {
                    shortMessage.LinkUrl = dataReader.GetString(8);
                }
                if (!dataReader.IsDBNull(9))
                {
                    shortMessage.LinkID = dataReader.GetString(9);
                }
                shortMessage.Type = dataReader.GetInt32(10);
                if (!dataReader.IsDBNull(11))
                {
                    shortMessage.Files = dataReader.GetString(11);
                }
                if (dataReader.FieldCount > 11)
                {
                    shortMessage.Status = dataReader.GetInt32(12);
                }
                else
                {
                    shortMessage.Status = 0;
                }
                list.Add(shortMessage);
            }
            return(list);
        }
Exemplo n.º 5
0
		private List<RoadFlow.Data.Model.ShortMessage> DataReaderToList(OracleDataReader dataReader)
		{
			List<RoadFlow.Data.Model.ShortMessage> list = new List<RoadFlow.Data.Model.ShortMessage>();
			RoadFlow.Data.Model.ShortMessage shortMessage = null;
			while (((DbDataReader)dataReader).Read())
			{
				shortMessage = new RoadFlow.Data.Model.ShortMessage();
				shortMessage.ID = ((DbDataReader)dataReader).GetString(0).ToGuid();
				shortMessage.Title = ((DbDataReader)dataReader).GetString(1);
				if (!((DbDataReader)dataReader).IsDBNull(2))
				{
					shortMessage.Contents = ((DbDataReader)dataReader).GetString(2);
				}
				shortMessage.SendUserID = ((DbDataReader)dataReader).GetString(3).ToGuid();
				shortMessage.SendUserName = ((DbDataReader)dataReader).GetString(4);
				shortMessage.ReceiveUserID = ((DbDataReader)dataReader).GetString(5).ToGuid();
				shortMessage.ReceiveUserName = ((DbDataReader)dataReader).GetString(6);
				shortMessage.SendTime = ((DbDataReader)dataReader).GetDateTime(7);
				if (!((DbDataReader)dataReader).IsDBNull(8))
				{
					shortMessage.LinkUrl = ((DbDataReader)dataReader).GetString(8);
				}
				if (!((DbDataReader)dataReader).IsDBNull(9))
				{
					shortMessage.LinkID = ((DbDataReader)dataReader).GetString(9);
				}
				shortMessage.Type = ((DbDataReader)dataReader).GetInt32(10);
				if (!((DbDataReader)dataReader).IsDBNull(11))
				{
					shortMessage.Files = ((DbDataReader)dataReader).GetString(11);
				}
				if (((DbDataReader)dataReader).FieldCount > 11)
				{
					shortMessage.Status = ((DbDataReader)dataReader).GetInt32(12);
				}
				else
				{
					shortMessage.Status = 0;
				}
				list.Add(shortMessage);
			}
			return list;
		}
Exemplo n.º 6
0
        public bool SendToWeiXin(RoadFlow.Data.Model.ShortMessage msg, string userAccounts)
        {
            if (msg == null)
            {
                return(false);
            }
            Message message = new Message();

            string[] imageUrlFromHTML = Tools.GetImageUrlFromHTML(msg.Contents);
            int      agentIDByCode    = new Agents().GetAgentIDByCode("weixinagents_infocenter");

            if (imageUrlFromHTML.Length != 0)
            {
                string item = RoadFlow.Platform.WeiXin.Config.WebUrl + imageUrlFromHTML[0];
                List <Tuple <string, string, string, string> > list = new List <Tuple <string, string, string, string> >();
                list.Add(new Tuple <string, string, string, string>(msg.Title, msg.Contents.RemoveHTML().CutString(100), RoadFlow.Platform.WeiXin.Config.WebUrl + RoadFlow.Utility.Config.BaseUrl + "/Platform/Info/ShortMessage/Show.aspx?id=" + msg.ID.ToString(), item));
                message.SendNews(list, userAccounts, "", "", agentIDByCode);
            }
            else
            {
                message.SendText(msg.Contents.RemoveHTML().CutString(100) + "\n点击链接阅读全文:" + RoadFlow.Platform.WeiXin.Config.WebUrl + RoadFlow.Utility.Config.BaseUrl + "Platform/Info/ShortMessage/Show.aspx?id=" + msg.ID.ToString(), userAccounts, "", "", 0, agentIDByCode);
            }
            return(true);
        }
Exemplo n.º 7
0
        public string Delete()
        {
            string text = base.Request.Form["ids"] ?? "";

            RoadFlow.Platform.ShortMessage shortMessage = new RoadFlow.Platform.ShortMessage();
            if (text.IsNullOrEmpty())
            {
                return("没有选择要删除的消息!");
            }
            string[] array = text.Split(',');
            foreach (string str in array)
            {
                if (str.IsGuid())
                {
                    RoadFlow.Data.Model.ShortMessage shortMessage2 = shortMessage.Get(str.ToGuid());
                    if (shortMessage2 != null)
                    {
                        shortMessage.Delete(shortMessage2.ID);
                        RoadFlow.Platform.Log.Add("删除了站内消息", shortMessage2.Serialize(), RoadFlow.Platform.Log.Types.信息管理);
                    }
                }
            }
            return("操作成功!");
        }
Exemplo n.º 8
0
 public int Update(RoadFlow.Data.Model.ShortMessage model)
 {
     return(dataShortMessage.Update(model));
 }
Exemplo n.º 9
0
 public int Add(RoadFlow.Data.Model.ShortMessage model)
 {
     return(dataShortMessage.Add(model));
 }
Exemplo n.º 10
0
        public int Update(RoadFlow.Data.Model.ShortMessage model)
        {
            string sql = "UPDATE ShortMessage SET \r\n\t\t\t\tTitle=@Title,Contents=@Contents,SendUserID=@SendUserID,SendUserName=@SendUserName,ReceiveUserID=@ReceiveUserID,ReceiveUserName=@ReceiveUserName,SendTime=@SendTime,LinkUrl=@LinkUrl,LinkID=@LinkID,Type=@Type,Files=@Files\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] parameter = new SqlParameter[12]
            {
                new SqlParameter("@Title", SqlDbType.NVarChar, 1000)
                {
                    Value = model.Title
                },
                (model.Contents == null) ? new SqlParameter("@Contents", SqlDbType.NVarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Contents", SqlDbType.NVarChar, -1)
                {
                    Value = model.Contents
                },
                new SqlParameter("@SendUserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.SendUserID
                },
                new SqlParameter("@SendUserName", SqlDbType.NVarChar, 1000)
                {
                    Value = model.SendUserName
                },
                new SqlParameter("@ReceiveUserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ReceiveUserID
                },
                new SqlParameter("@ReceiveUserName", SqlDbType.NVarChar, 1000)
                {
                    Value = model.ReceiveUserName
                },
                new SqlParameter("@SendTime", SqlDbType.DateTime, 8)
                {
                    Value = model.SendTime
                },
                (model.LinkUrl == null) ? new SqlParameter("@LinkUrl", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@LinkUrl", SqlDbType.VarChar, -1)
                {
                    Value = model.LinkUrl
                },
                (model.LinkID == null) ? new SqlParameter("@LinkID", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@LinkID", SqlDbType.VarChar, 50)
                {
                    Value = model.LinkID
                },
                new SqlParameter("@Type", SqlDbType.Int, -1)
                {
                    Value = model.Type
                },
                (model.Files == null) ? new SqlParameter("@Files", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Files", SqlDbType.VarChar, -1)
                {
                    Value = model.Files
                },
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 11
0
        public int Add(RoadFlow.Data.Model.ShortMessage model)
        {
            string sql = "INSERT INTO ShortMessage\r\n\t\t\t\t(ID,Title,Contents,SendUserID,SendUserName,ReceiveUserID,ReceiveUserName,SendTime,LinkUrl,LinkID,Type,Files) \r\n\t\t\t\tVALUES(@ID,@Title,@Contents,@SendUserID,@SendUserName,@ReceiveUserID,@ReceiveUserName,@SendTime,@LinkUrl,@LinkID,@Type,@Files)";

            SqlParameter[] parameter = new SqlParameter[12]
            {
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                },
                new SqlParameter("@Title", SqlDbType.NVarChar, 1000)
                {
                    Value = model.Title
                },
                (model.Contents == null) ? new SqlParameter("@Contents", SqlDbType.NVarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Contents", SqlDbType.NVarChar, -1)
                {
                    Value = model.Contents
                },
                new SqlParameter("@SendUserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.SendUserID
                },
                new SqlParameter("@SendUserName", SqlDbType.NVarChar, 1000)
                {
                    Value = model.SendUserName
                },
                new SqlParameter("@ReceiveUserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ReceiveUserID
                },
                new SqlParameter("@ReceiveUserName", SqlDbType.NVarChar, 1000)
                {
                    Value = model.ReceiveUserName
                },
                new SqlParameter("@SendTime", SqlDbType.DateTime, 8)
                {
                    Value = model.SendTime
                },
                (model.LinkUrl == null) ? new SqlParameter("@LinkUrl", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@LinkUrl", SqlDbType.VarChar, -1)
                {
                    Value = model.LinkUrl
                },
                (model.LinkID == null) ? new SqlParameter("@LinkID", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@LinkID", SqlDbType.VarChar, 50)
                {
                    Value = model.LinkID
                },
                new SqlParameter("@Type", SqlDbType.Int, -1)
                {
                    Value = model.Type
                },
                (model.Files == null) ? new SqlParameter("@Files", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Files", SqlDbType.VarChar, -1)
                {
                    Value = model.Files
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 12
0
        public int Update(RoadFlow.Data.Model.ShortMessage model)
        {
            //IL_001a: Unknown result type (might be due to invalid IL or missing references)
            //IL_001f: Unknown result type (might be due to invalid IL or missing references)
            //IL_002b: Expected O, but got Unknown
            //IL_002c: Expected O, but got Unknown
            //IL_0045: Unknown result type (might be due to invalid IL or missing references)
            //IL_004a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0056: Expected O, but got Unknown
            //IL_0067: Unknown result type (might be due to invalid IL or missing references)
            //IL_006c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0077: Expected O, but got Unknown
            //IL_0078: Expected O, but got Unknown
            //IL_0086: Unknown result type (might be due to invalid IL or missing references)
            //IL_008b: Unknown result type (might be due to invalid IL or missing references)
            //IL_009c: Expected O, but got Unknown
            //IL_009d: Expected O, but got Unknown
            //IL_00aa: Unknown result type (might be due to invalid IL or missing references)
            //IL_00af: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bb: Expected O, but got Unknown
            //IL_00bc: Expected O, but got Unknown
            //IL_00ca: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e0: Expected O, but got Unknown
            //IL_00e1: Expected O, but got Unknown
            //IL_00ee: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00ff: Expected O, but got Unknown
            //IL_0100: Expected O, but got Unknown
            //IL_010a: Unknown result type (might be due to invalid IL or missing references)
            //IL_010f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0120: Expected O, but got Unknown
            //IL_0121: Expected O, but got Unknown
            //IL_013a: Unknown result type (might be due to invalid IL or missing references)
            //IL_013f: Unknown result type (might be due to invalid IL or missing references)
            //IL_014b: Expected O, but got Unknown
            //IL_015c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0161: Unknown result type (might be due to invalid IL or missing references)
            //IL_016c: Expected O, but got Unknown
            //IL_016d: Expected O, but got Unknown
            //IL_0183: Unknown result type (might be due to invalid IL or missing references)
            //IL_0188: Unknown result type (might be due to invalid IL or missing references)
            //IL_0194: Expected O, but got Unknown
            //IL_01a2: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a7: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b2: Expected O, but got Unknown
            //IL_01b3: Expected O, but got Unknown
            //IL_01be: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c3: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d4: Expected O, but got Unknown
            //IL_01d5: Expected O, but got Unknown
            //IL_01e3: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f4: Expected O, but got Unknown
            //IL_01f5: Expected O, but got Unknown
            //IL_0204: Unknown result type (might be due to invalid IL or missing references)
            //IL_0209: Unknown result type (might be due to invalid IL or missing references)
            //IL_021a: Expected O, but got Unknown
            //IL_021b: Expected O, but got Unknown
            string sql = "UPDATE shortmessage SET \r\n\t\t\t\tTitle=@Title,Contents=@Contents,SendUserID=@SendUserID,SendUserName=@SendUserName,ReceiveUserID=@ReceiveUserID,ReceiveUserName=@ReceiveUserName,SendTime=@SendTime,LinkUrl=@LinkUrl,LinkID=@LinkID,Type=@Type,Files=@Files\r\n\t\t\t\tWHERE ID=@ID";

            MySqlParameter[] obj = new MySqlParameter[12];
            MySqlParameter   val = new MySqlParameter("@Title", 752, -1);

            ((DbParameter)val).Value = model.Title;
            obj[0] = val;
            _003F val2;

            if (model.Contents != null)
            {
                val2 = new MySqlParameter("@Contents", 253, 4000);
                ((DbParameter)val2).Value = model.Contents;
            }
            else
            {
                val2 = new MySqlParameter("@Contents", 253, 4000);
                ((DbParameter)val2).Value = DBNull.Value;
            }
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@SendUserID", 253, 36);

            ((DbParameter)val3).Value = model.SendUserID;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@SendUserName", 752, -1);

            ((DbParameter)val4).Value = model.SendUserName;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@ReceiveUserID", 253, 36);

            ((DbParameter)val5).Value = model.ReceiveUserID;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@ReceiveUserName", 752, -1);

            ((DbParameter)val6).Value = model.ReceiveUserName;
            obj[5] = val6;
            MySqlParameter val7 = new MySqlParameter("@SendTime", 12, -1);

            ((DbParameter)val7).Value = model.SendTime;
            obj[6] = val7;
            _003F val8;

            if (model.LinkUrl != null)
            {
                val8 = new MySqlParameter("@LinkUrl", 253, 2000);
                ((DbParameter)val8).Value = model.LinkUrl;
            }
            else
            {
                val8 = new MySqlParameter("@LinkUrl", 253, 2000);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.LinkID != null)
            {
                val9 = new MySqlParameter("@LinkID", 253, 50);
                ((DbParameter)val9).Value = model.LinkID;
            }
            else
            {
                val9 = new MySqlParameter("@LinkID", 253, 50);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            MySqlParameter val10 = new MySqlParameter("@Type", 3, 11);

            ((DbParameter)val10).Value = model.Type;
            obj[9] = val10;
            MySqlParameter val11 = new MySqlParameter("@Files", 752, -1);

            ((DbParameter)val11).Value = model.Files;
            obj[10] = val11;
            MySqlParameter val12 = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val12).Value = model.ID;
            obj[11] = val12;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 13
0
        public int Add(RoadFlow.Data.Model.ShortMessage model)
        {
            //IL_001b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0020: Unknown result type (might be due to invalid IL or missing references)
            //IL_0031: Expected O, but got Unknown
            //IL_0032: Expected O, but got Unknown
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0044: Unknown result type (might be due to invalid IL or missing references)
            //IL_0050: Expected O, but got Unknown
            //IL_0051: Expected O, but got Unknown
            //IL_006a: Unknown result type (might be due to invalid IL or missing references)
            //IL_006f: Unknown result type (might be due to invalid IL or missing references)
            //IL_007b: Expected O, but got Unknown
            //IL_008c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0091: Unknown result type (might be due to invalid IL or missing references)
            //IL_009c: Expected O, but got Unknown
            //IL_009d: Expected O, but got Unknown
            //IL_00ab: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c1: Expected O, but got Unknown
            //IL_00c2: Expected O, but got Unknown
            //IL_00cf: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e0: Expected O, but got Unknown
            //IL_00e1: Expected O, but got Unknown
            //IL_00ef: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f4: Unknown result type (might be due to invalid IL or missing references)
            //IL_0105: Expected O, but got Unknown
            //IL_0106: Expected O, but got Unknown
            //IL_0113: Unknown result type (might be due to invalid IL or missing references)
            //IL_0118: Unknown result type (might be due to invalid IL or missing references)
            //IL_0124: Expected O, but got Unknown
            //IL_0125: Expected O, but got Unknown
            //IL_012f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0134: Unknown result type (might be due to invalid IL or missing references)
            //IL_0145: Expected O, but got Unknown
            //IL_0146: Expected O, but got Unknown
            //IL_015f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0164: Unknown result type (might be due to invalid IL or missing references)
            //IL_0170: Expected O, but got Unknown
            //IL_0181: Unknown result type (might be due to invalid IL or missing references)
            //IL_0186: Unknown result type (might be due to invalid IL or missing references)
            //IL_0191: Expected O, but got Unknown
            //IL_0192: Expected O, but got Unknown
            //IL_01a9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ae: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ba: Expected O, but got Unknown
            //IL_01c8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cd: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d8: Expected O, but got Unknown
            //IL_01d9: Expected O, but got Unknown
            //IL_01e4: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01fa: Expected O, but got Unknown
            //IL_01fb: Expected O, but got Unknown
            //IL_0209: Unknown result type (might be due to invalid IL or missing references)
            //IL_020e: Unknown result type (might be due to invalid IL or missing references)
            //IL_021a: Expected O, but got Unknown
            //IL_021b: Expected O, but got Unknown
            string sql = "INSERT INTO shortmessage\r\n\t\t\t\t(ID,Title,Contents,SendUserID,SendUserName,ReceiveUserID,ReceiveUserName,SendTime,LinkUrl,LinkID,Type,Files) \r\n\t\t\t\tVALUES(@ID,@Title,@Contents,@SendUserID,@SendUserName,@ReceiveUserID,@ReceiveUserName,@SendTime,@LinkUrl,@LinkID,@Type,@Files)";

            MySqlParameter[] obj = new MySqlParameter[12];
            MySqlParameter   val = new MySqlParameter("@ID", 253, 36);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Title", 752, -1);

            ((DbParameter)val2).Value = model.Title;
            obj[1] = val2;
            _003F val3;

            if (model.Contents != null)
            {
                val3 = new MySqlParameter("@Contents", 253, 4000);
                ((DbParameter)val3).Value = model.Contents;
            }
            else
            {
                val3 = new MySqlParameter("@Contents", 253, 4000);
                ((DbParameter)val3).Value = DBNull.Value;
            }
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@SendUserID", 253, 36);

            ((DbParameter)val4).Value = model.SendUserID;
            obj[3] = val4;
            MySqlParameter val5 = new MySqlParameter("@SendUserName", 752, -1);

            ((DbParameter)val5).Value = model.SendUserName;
            obj[4] = val5;
            MySqlParameter val6 = new MySqlParameter("@ReceiveUserID", 253, 36);

            ((DbParameter)val6).Value = model.ReceiveUserID;
            obj[5] = val6;
            MySqlParameter val7 = new MySqlParameter("@ReceiveUserName", 752, -1);

            ((DbParameter)val7).Value = model.ReceiveUserName;
            obj[6] = val7;
            MySqlParameter val8 = new MySqlParameter("@SendTime", 12, -1);

            ((DbParameter)val8).Value = model.SendTime;
            obj[7] = val8;
            _003F val9;

            if (model.LinkUrl != null)
            {
                val9 = new MySqlParameter("@LinkUrl", 253, 2000);
                ((DbParameter)val9).Value = model.LinkUrl;
            }
            else
            {
                val9 = new MySqlParameter("@LinkUrl", 253, 2000);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.LinkID != null)
            {
                val10 = new MySqlParameter("@LinkID", 253, 50);
                ((DbParameter)val10).Value = model.LinkID;
            }
            else
            {
                val10 = new MySqlParameter("@LinkID", 253, 50);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            MySqlParameter val11 = new MySqlParameter("@Type", 3, 11);

            ((DbParameter)val11).Value = model.Type;
            obj[10] = val11;
            MySqlParameter val12 = new MySqlParameter("@Files", 752, -1);

            ((DbParameter)val12).Value = model.Files;
            obj[11] = val12;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Exemplo n.º 14
0
		public int Add(RoadFlow.Data.Model.ShortMessage model)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_002c: Expected O, but got Unknown
			//IL_002d: Expected O, but got Unknown
			//IL_0036: Unknown result type (might be due to invalid IL or missing references)
			//IL_003b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0048: Expected O, but got Unknown
			//IL_0059: Unknown result type (might be due to invalid IL or missing references)
			//IL_005e: Unknown result type (might be due to invalid IL or missing references)
			//IL_006a: Expected O, but got Unknown
			//IL_0073: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0084: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Expected O, but got Unknown
			//IL_00a4: Expected O, but got Unknown
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Expected O, but got Unknown
			//IL_00bf: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Expected O, but got Unknown
			//IL_00df: Expected O, but got Unknown
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_00fa: Expected O, but got Unknown
			//IL_0103: Unknown result type (might be due to invalid IL or missing references)
			//IL_0108: Unknown result type (might be due to invalid IL or missing references)
			//IL_0119: Expected O, but got Unknown
			//IL_011a: Expected O, but got Unknown
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Expected O, but got Unknown
			//IL_0145: Unknown result type (might be due to invalid IL or missing references)
			//IL_014a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0155: Expected O, but got Unknown
			//IL_0156: Expected O, but got Unknown
			//IL_0168: Unknown result type (might be due to invalid IL or missing references)
			//IL_016d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0179: Expected O, but got Unknown
			//IL_0182: Unknown result type (might be due to invalid IL or missing references)
			//IL_0187: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Expected O, but got Unknown
			//IL_0193: Expected O, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b3: Expected O, but got Unknown
			//IL_01b4: Expected O, but got Unknown
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Expected O, but got Unknown
			//IL_01d0: Expected O, but got Unknown
			string sql = "INSERT INTO ShortMessage\r\n\t\t\t\t(ID,Title,Contents,SendUserID,SendUserName,ReceiveUserID,ReceiveUserName,SendTime,LinkUrl,LinkID,Type,Files) \r\n\t\t\t\tVALUES(:ID,:Title,:Contents,:SendUserID,:SendUserName,:ReceiveUserID,:ReceiveUserName,:SendTime,:LinkUrl,:LinkID,:Type,:Files)";
			OracleParameter[] obj = new OracleParameter[12];
			OracleParameter val = new OracleParameter(":ID", 126);
			((DbParameter)val).Value = model.ID;
			obj[0] = val;
			OracleParameter val2 = new OracleParameter(":Title", 119);
			((DbParameter)val2).Value = model.Title;
			obj[1] = val2;
			_003F val3;
			if (model.Contents != null)
			{
				val3 = new OracleParameter(":Contents", 119);
				((DbParameter)val3).Value = model.Contents;
			}
			else
			{
				val3 = new OracleParameter(":Contents", 119);
				((DbParameter)val3).Value = DBNull.Value;
			}
			obj[2] = val3;
			OracleParameter val4 = new OracleParameter(":SendUserID", 126);
			((DbParameter)val4).Value = model.SendUserID;
			obj[3] = val4;
			OracleParameter val5 = new OracleParameter(":SendUserName", 119);
			((DbParameter)val5).Value = model.SendUserName;
			obj[4] = val5;
			OracleParameter val6 = new OracleParameter(":ReceiveUserID", 126);
			((DbParameter)val6).Value = model.ReceiveUserID;
			obj[5] = val6;
			OracleParameter val7 = new OracleParameter(":ReceiveUserName", 119);
			((DbParameter)val7).Value = model.ReceiveUserName;
			obj[6] = val7;
			OracleParameter val8 = new OracleParameter(":SendTime", 106);
			((DbParameter)val8).Value = model.SendTime;
			obj[7] = val8;
			_003F val9;
			if (model.LinkUrl != null)
			{
				val9 = new OracleParameter(":LinkUrl", 126);
				((DbParameter)val9).Value = model.LinkUrl;
			}
			else
			{
				val9 = new OracleParameter(":LinkUrl", 126);
				((DbParameter)val9).Value = DBNull.Value;
			}
			obj[8] = val9;
			_003F val10;
			if (model.LinkID != null)
			{
				val10 = new OracleParameter(":LinkID", 126);
				((DbParameter)val10).Value = model.LinkID;
			}
			else
			{
				val10 = new OracleParameter(":LinkID", 126);
				((DbParameter)val10).Value = DBNull.Value;
			}
			obj[9] = val10;
			OracleParameter val11 = new OracleParameter(":Type", 112);
			((DbParameter)val11).Value = model.Type;
			obj[10] = val11;
			OracleParameter val12 = new OracleParameter(":Files", 126);
			((DbParameter)val12).Value = model.Files;
			obj[11] = val12;
			OracleParameter[] parameter = (OracleParameter[])obj;
			return dbHelper.Execute(sql, parameter);
		}
Exemplo n.º 15
0
		public int Update(RoadFlow.Data.Model.ShortMessage model)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0027: Expected O, but got Unknown
			//IL_0028: Expected O, but got Unknown
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_004a: Expected O, but got Unknown
			//IL_0053: Unknown result type (might be due to invalid IL or missing references)
			//IL_0058: Unknown result type (might be due to invalid IL or missing references)
			//IL_0063: Expected O, but got Unknown
			//IL_0064: Expected O, but got Unknown
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0072: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Expected O, but got Unknown
			//IL_0084: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Expected O, but got Unknown
			//IL_009f: Expected O, but got Unknown
			//IL_00a8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ad: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Expected O, but got Unknown
			//IL_00bf: Expected O, but got Unknown
			//IL_00c8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d9: Expected O, but got Unknown
			//IL_00da: Expected O, but got Unknown
			//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f9: Expected O, but got Unknown
			//IL_00fa: Expected O, but got Unknown
			//IL_010b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Expected O, but got Unknown
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Expected O, but got Unknown
			//IL_0136: Expected O, but got Unknown
			//IL_0147: Unknown result type (might be due to invalid IL or missing references)
			//IL_014c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0158: Expected O, but got Unknown
			//IL_0161: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Expected O, but got Unknown
			//IL_0172: Expected O, but got Unknown
			//IL_017c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0181: Unknown result type (might be due to invalid IL or missing references)
			//IL_0192: Expected O, but got Unknown
			//IL_0193: Expected O, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01ae: Expected O, but got Unknown
			//IL_01af: Expected O, but got Unknown
			//IL_01b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_01be: Unknown result type (might be due to invalid IL or missing references)
			//IL_01cf: Expected O, but got Unknown
			//IL_01d0: Expected O, but got Unknown
			string sql = "UPDATE ShortMessage SET \r\n\t\t\t\tTitle=:Title,Contents=:Contents,SendUserID=:SendUserID,SendUserName=:SendUserName,ReceiveUserID=:ReceiveUserID,ReceiveUserName=:ReceiveUserName,SendTime=:SendTime,LinkUrl=:LinkUrl,LinkID=:LinkID,Type=:Type,Files=:Files\r\n\t\t\t\tWHERE ID=:ID";
			OracleParameter[] obj = new OracleParameter[12];
			OracleParameter val = new OracleParameter(":Title", 119);
			((DbParameter)val).Value = model.Title;
			obj[0] = val;
			_003F val2;
			if (model.Contents != null)
			{
				val2 = new OracleParameter(":Contents", 126);
				((DbParameter)val2).Value = model.Contents;
			}
			else
			{
				val2 = new OracleParameter(":Contents", 119);
				((DbParameter)val2).Value = DBNull.Value;
			}
			obj[1] = val2;
			OracleParameter val3 = new OracleParameter(":SendUserID", 126);
			((DbParameter)val3).Value = model.SendUserID;
			obj[2] = val3;
			OracleParameter val4 = new OracleParameter(":SendUserName", 119);
			((DbParameter)val4).Value = model.SendUserName;
			obj[3] = val4;
			OracleParameter val5 = new OracleParameter(":ReceiveUserID", 126);
			((DbParameter)val5).Value = model.ReceiveUserID;
			obj[4] = val5;
			OracleParameter val6 = new OracleParameter(":ReceiveUserName", 119);
			((DbParameter)val6).Value = model.ReceiveUserName;
			obj[5] = val6;
			OracleParameter val7 = new OracleParameter(":SendTime", 106);
			((DbParameter)val7).Value = model.SendTime;
			obj[6] = val7;
			_003F val8;
			if (model.LinkUrl != null)
			{
				val8 = new OracleParameter(":LinkUrl", 126);
				((DbParameter)val8).Value = model.LinkUrl;
			}
			else
			{
				val8 = new OracleParameter(":LinkUrl", 126);
				((DbParameter)val8).Value = DBNull.Value;
			}
			obj[7] = val8;
			_003F val9;
			if (model.LinkID != null)
			{
				val9 = new OracleParameter(":LinkID", 126);
				((DbParameter)val9).Value = model.LinkID;
			}
			else
			{
				val9 = new OracleParameter(":LinkID", 126);
				((DbParameter)val9).Value = DBNull.Value;
			}
			obj[8] = val9;
			OracleParameter val10 = new OracleParameter(":Type", 112);
			((DbParameter)val10).Value = model.Type;
			obj[9] = val10;
			OracleParameter val11 = new OracleParameter(":Files", 126);
			((DbParameter)val11).Value = model.Files;
			obj[10] = val11;
			OracleParameter val12 = new OracleParameter(":ID", 126);
			((DbParameter)val12).Value = model.ID;
			obj[11] = val12;
			OracleParameter[] parameter = (OracleParameter[])obj;
			return dbHelper.Execute(sql, parameter);
		}