Example #1
0
 public static void Add(string title, string contents, Types type = Types.其它分类, string oldXML = "", string newXML = "", RoadFlow.Data.Model.Users user = null)
 {
     RoadFlow.Data.Model.Log log = new RoadFlow.Data.Model.Log();
     log.Contents = contents;
     log.ID       = Guid.NewGuid();
     log.Title    = title;
     log.OldXml   = (oldXML.IsNullOrEmpty() ? null : oldXML);
     log.NewXml   = (newXML.IsNullOrEmpty() ? null : newXML);
     log.Type     = type.ToString();
     try
     {
         if (user == null)
         {
             user = Users.CurrentUser;
         }
         if (user != null)
         {
             log.UserID   = user.ID;
             log.UserName = user.Name;
         }
         log.IPAddress = Tools.GetIPAddress();
         log.Others    = string.Format("操作系统:{0} 浏览器:{1}", Tools.GetOSName(), Tools.GetBrowse());
         log.URL       = HttpContext.Current.Request.Url.ToString();
     }
     catch
     {
     }
     log.WriteTime = DateTimeNew.Now;
     Add(log);
 }
Example #2
0
        private List <RoadFlow.Data.Model.Log> DataReaderToList(SqlDataReader dataReader)
        {
            List <RoadFlow.Data.Model.Log> list = new List <RoadFlow.Data.Model.Log>();

            RoadFlow.Data.Model.Log log = null;
            while (dataReader.Read())
            {
                log           = new RoadFlow.Data.Model.Log();
                log.ID        = dataReader.GetGuid(0);
                log.Title     = dataReader.GetString(1);
                log.Type      = dataReader.GetString(2);
                log.WriteTime = dataReader.GetDateTime(3);
                if (!dataReader.IsDBNull(4))
                {
                    log.UserID = dataReader.GetGuid(4);
                }
                if (!dataReader.IsDBNull(5))
                {
                    log.UserName = dataReader.GetString(5);
                }
                if (!dataReader.IsDBNull(6))
                {
                    log.IPAddress = dataReader.GetString(6);
                }
                if (!dataReader.IsDBNull(7))
                {
                    log.URL = dataReader.GetString(7);
                }
                if (!dataReader.IsDBNull(8))
                {
                    log.Contents = dataReader.GetString(8);
                }
                if (!dataReader.IsDBNull(9))
                {
                    log.Others = dataReader.GetString(9);
                }
                if (!dataReader.IsDBNull(10))
                {
                    log.OldXml = dataReader.GetString(10);
                }
                if (!dataReader.IsDBNull(11))
                {
                    log.NewXml = dataReader.GetString(11);
                }
                list.Add(log);
            }
            return(list);
        }
Example #3
0
 public static void Add(RoadFlow.Data.Model.Log model)
 {
     new dgWriteLog(add).BeginInvoke(model, null, null);
 }
Example #4
0
 private static void add(RoadFlow.Data.Model.Log model)
 {
     dataLog1.Add(model);
 }
Example #5
0
 public int Update(RoadFlow.Data.Model.Log model)
 {
     return(dataLog.Update(model));
 }
Example #6
0
        public int Update(RoadFlow.Data.Model.Log model)
        {
            string sql = "UPDATE Log SET \r\n\t\t\t\tTitle=@Title,Type=@Type,WriteTime=@WriteTime,UserID=@UserID,UserName=@UserName,IPAddress=@IPAddress,URL=@URL,Contents=@Contents,Others=@Others,OldXml=@OldXml,NewXml=@NewXml\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] parameter = new SqlParameter[12]
            {
                new SqlParameter("@Title", SqlDbType.NVarChar, -1)
                {
                    Value = model.Title
                },
                new SqlParameter("@Type", SqlDbType.NVarChar, 100)
                {
                    Value = model.Type
                },
                new SqlParameter("@WriteTime", SqlDbType.DateTime, 8)
                {
                    Value = model.WriteTime
                },
                (!model.UserID.HasValue) ? new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.UserID
                },
                (model.UserName == null) ? new SqlParameter("@UserName", SqlDbType.NVarChar, 100)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@UserName", SqlDbType.NVarChar, 100)
                {
                    Value = model.UserName
                },
                (model.IPAddress == null) ? new SqlParameter("@IPAddress", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@IPAddress", SqlDbType.VarChar, 50)
                {
                    Value = model.IPAddress
                },
                (model.URL == null) ? new SqlParameter("@URL", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@URL", SqlDbType.VarChar, -1)
                {
                    Value = model.URL
                },
                (model.Contents == null) ? new SqlParameter("@Contents", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Contents", SqlDbType.VarChar, -1)
                {
                    Value = model.Contents
                },
                (model.Others == null) ? new SqlParameter("@Others", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Others", SqlDbType.VarChar, -1)
                {
                    Value = model.Others
                },
                (model.OldXml == null) ? new SqlParameter("@OldXml", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@OldXml", SqlDbType.VarChar, -1)
                {
                    Value = model.OldXml
                },
                (model.NewXml == null) ? new SqlParameter("@NewXml", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@NewXml", SqlDbType.VarChar, -1)
                {
                    Value = model.NewXml
                },
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Example #7
0
        public int Add(RoadFlow.Data.Model.Log model)
        {
            string sql = "INSERT INTO Log\r\n\t\t\t\t(ID,Title,Type,WriteTime,UserID,UserName,IPAddress,URL,Contents,Others,OldXml,NewXml) \r\n\t\t\t\tVALUES(@ID,@Title,@Type,@WriteTime,@UserID,@UserName,@IPAddress,@URL,@Contents,@Others,@OldXml,@NewXml)";

            SqlParameter[] parameter = new SqlParameter[12]
            {
                new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.ID
                },
                new SqlParameter("@Title", SqlDbType.NVarChar, -1)
                {
                    Value = model.Title
                },
                new SqlParameter("@Type", SqlDbType.NVarChar, 100)
                {
                    Value = model.Type
                },
                new SqlParameter("@WriteTime", SqlDbType.DateTime, 8)
                {
                    Value = model.WriteTime
                },
                (!model.UserID.HasValue) ? new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.UserID
                },
                (model.UserName == null) ? new SqlParameter("@UserName", SqlDbType.NVarChar, 100)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@UserName", SqlDbType.NVarChar, 100)
                {
                    Value = model.UserName
                },
                (model.IPAddress == null) ? new SqlParameter("@IPAddress", SqlDbType.VarChar, 50)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@IPAddress", SqlDbType.VarChar, 50)
                {
                    Value = model.IPAddress
                },
                (model.URL == null) ? new SqlParameter("@URL", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@URL", SqlDbType.VarChar, -1)
                {
                    Value = model.URL
                },
                (model.Contents == null) ? new SqlParameter("@Contents", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Contents", SqlDbType.VarChar, -1)
                {
                    Value = model.Contents
                },
                (model.Others == null) ? new SqlParameter("@Others", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@Others", SqlDbType.VarChar, -1)
                {
                    Value = model.Others
                },
                (model.OldXml == null) ? new SqlParameter("@OldXml", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@OldXml", SqlDbType.VarChar, -1)
                {
                    Value = model.OldXml
                },
                (model.NewXml == null) ? new SqlParameter("@NewXml", SqlDbType.VarChar, -1)
                {
                    Value = DBNull.Value
                } : new SqlParameter("@NewXml", SqlDbType.VarChar, -1)
                {
                    Value = model.NewXml
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
Example #8
0
        public int Update(RoadFlow.Data.Model.Log 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_003a: Unknown result type (might be due to invalid IL or missing references)
            //IL_003f: Unknown result type (might be due to invalid IL or missing references)
            //IL_004b: Expected O, but got Unknown
            //IL_004c: Expected O, but got Unknown
            //IL_0056: Unknown result type (might be due to invalid IL or missing references)
            //IL_005b: Unknown result type (might be due to invalid IL or missing references)
            //IL_006c: Expected O, but got Unknown
            //IL_006d: Expected O, but got Unknown
            //IL_008b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0090: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a1: Expected O, but got Unknown
            //IL_00af: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00bf: Expected O, but got Unknown
            //IL_00c0: Expected O, but got Unknown
            //IL_00d6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00db: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e7: Expected O, but got Unknown
            //IL_00f5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00fa: 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_011c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0121: Unknown result type (might be due to invalid IL or missing references)
            //IL_012d: Expected O, but got Unknown
            //IL_013b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0140: Unknown result type (might be due to invalid IL or missing references)
            //IL_014b: Expected O, but got Unknown
            //IL_014c: 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_0172: Expected O, but got Unknown
            //IL_017f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0184: Unknown result type (might be due to invalid IL or missing references)
            //IL_018f: Expected O, but got Unknown
            //IL_0190: Expected O, but got Unknown
            //IL_01a5: Unknown result type (might be due to invalid IL or missing references)
            //IL_01aa: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b6: Expected O, but got Unknown
            //IL_01c3: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01d3: Expected O, but got Unknown
            //IL_01d4: Expected O, but got Unknown
            //IL_01e9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ee: Unknown result type (might be due to invalid IL or missing references)
            //IL_01fa: Expected O, but got Unknown
            //IL_0207: Unknown result type (might be due to invalid IL or missing references)
            //IL_020c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0217: Expected O, but got Unknown
            //IL_0218: Expected O, but got Unknown
            //IL_022e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0233: Unknown result type (might be due to invalid IL or missing references)
            //IL_023f: Expected O, but got Unknown
            //IL_024c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0251: Unknown result type (might be due to invalid IL or missing references)
            //IL_025c: Expected O, but got Unknown
            //IL_025d: Expected O, but got Unknown
            //IL_0273: Unknown result type (might be due to invalid IL or missing references)
            //IL_0278: Unknown result type (might be due to invalid IL or missing references)
            //IL_0284: Expected O, but got Unknown
            //IL_0291: Unknown result type (might be due to invalid IL or missing references)
            //IL_0296: Unknown result type (might be due to invalid IL or missing references)
            //IL_02a1: Expected O, but got Unknown
            //IL_02a2: Expected O, but got Unknown
            //IL_02b1: Unknown result type (might be due to invalid IL or missing references)
            //IL_02b6: Unknown result type (might be due to invalid IL or missing references)
            //IL_02c7: Expected O, but got Unknown
            //IL_02c8: Expected O, but got Unknown
            string sql = "UPDATE log SET \r\n\t\t\t\tTitle=@Title,Type=@Type,WriteTime=@WriteTime,UserID=@UserID,UserName=@UserName,IPAddress=@IPAddress,URL=@URL,Contents=@Contents,Others=@Others,OldXml=@OldXml,NewXml=@NewXml\r\n\t\t\t\tWHERE ID=@ID";

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

            ((DbParameter)val).Value = model.Title;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Type", 253, 50);

            ((DbParameter)val2).Value = model.Type;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@WriteTime", 12, -1);

            ((DbParameter)val3).Value = model.WriteTime;
            obj[2] = val3;
            _003F val4;

            if (model.UserID.HasValue)
            {
                val4 = new MySqlParameter("@UserID", 253, 36);
                ((DbParameter)val4).Value = model.UserID;
            }
            else
            {
                val4 = new MySqlParameter("@UserID", 253, 36);
                ((DbParameter)val4).Value = DBNull.Value;
            }
            obj[3] = val4;
            _003F val5;

            if (model.UserName != null)
            {
                val5 = new MySqlParameter("@UserName", 253, 50);
                ((DbParameter)val5).Value = model.UserName;
            }
            else
            {
                val5 = new MySqlParameter("@UserName", 253, 50);
                ((DbParameter)val5).Value = DBNull.Value;
            }
            obj[4] = val5;
            _003F val6;

            if (model.IPAddress != null)
            {
                val6 = new MySqlParameter("@IPAddress", 253, 50);
                ((DbParameter)val6).Value = model.IPAddress;
            }
            else
            {
                val6 = new MySqlParameter("@IPAddress", 253, 50);
                ((DbParameter)val6).Value = DBNull.Value;
            }
            obj[5] = val6;
            _003F val7;

            if (model.URL != null)
            {
                val7 = new MySqlParameter("@URL", 751, -1);
                ((DbParameter)val7).Value = model.URL;
            }
            else
            {
                val7 = new MySqlParameter("@URL", 751, -1);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.Contents != null)
            {
                val8 = new MySqlParameter("@Contents", 751, -1);
                ((DbParameter)val8).Value = model.Contents;
            }
            else
            {
                val8 = new MySqlParameter("@Contents", 751, -1);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.Others != null)
            {
                val9 = new MySqlParameter("@Others", 751, -1);
                ((DbParameter)val9).Value = model.Others;
            }
            else
            {
                val9 = new MySqlParameter("@Others", 751, -1);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.OldXml != null)
            {
                val10 = new MySqlParameter("@OldXml", 751, -1);
                ((DbParameter)val10).Value = model.OldXml;
            }
            else
            {
                val10 = new MySqlParameter("@OldXml", 751, -1);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.NewXml != null)
            {
                val11 = new MySqlParameter("@NewXml", 751, -1);
                ((DbParameter)val11).Value = model.NewXml;
            }
            else
            {
                val11 = new MySqlParameter("@NewXml", 751, -1);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            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));
        }
Example #9
0
        public int Add(RoadFlow.Data.Model.Log 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_005f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0064: Unknown result type (might be due to invalid IL or missing references)
            //IL_0070: Expected O, but got Unknown
            //IL_0071: Expected O, but got Unknown
            //IL_007b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0080: Unknown result type (might be due to invalid IL or missing references)
            //IL_0091: Expected O, but got Unknown
            //IL_0092: Expected O, but got Unknown
            //IL_00b0: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b5: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c6: Expected O, but got Unknown
            //IL_00d4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e4: Expected O, but got Unknown
            //IL_00e5: Expected O, but got Unknown
            //IL_00fb: Unknown result type (might be due to invalid IL or missing references)
            //IL_0100: Unknown result type (might be due to invalid IL or missing references)
            //IL_010c: Expected O, but got Unknown
            //IL_011a: Unknown result type (might be due to invalid IL or missing references)
            //IL_011f: Unknown result type (might be due to invalid IL or missing references)
            //IL_012a: Expected O, but got Unknown
            //IL_012b: Expected O, but got Unknown
            //IL_0141: Unknown result type (might be due to invalid IL or missing references)
            //IL_0146: Unknown result type (might be due to invalid IL or missing references)
            //IL_0152: Expected O, but got Unknown
            //IL_0160: Unknown result type (might be due to invalid IL or missing references)
            //IL_0165: Unknown result type (might be due to invalid IL or missing references)
            //IL_0170: Expected O, but got Unknown
            //IL_0171: Expected O, but got Unknown
            //IL_0186: Unknown result type (might be due to invalid IL or missing references)
            //IL_018b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0197: Expected O, but got Unknown
            //IL_01a4: Unknown result type (might be due to invalid IL or missing references)
            //IL_01a9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01b4: Expected O, but got Unknown
            //IL_01b5: Expected O, but got Unknown
            //IL_01ca: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cf: Unknown result type (might be due to invalid IL or missing references)
            //IL_01db: Expected O, but got Unknown
            //IL_01e8: Unknown result type (might be due to invalid IL or missing references)
            //IL_01ed: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f8: Expected O, but got Unknown
            //IL_01f9: Expected O, but got Unknown
            //IL_020f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0214: Unknown result type (might be due to invalid IL or missing references)
            //IL_0220: Expected O, but got Unknown
            //IL_022d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0232: Unknown result type (might be due to invalid IL or missing references)
            //IL_023d: Expected O, but got Unknown
            //IL_023e: Expected O, but got Unknown
            //IL_0254: Unknown result type (might be due to invalid IL or missing references)
            //IL_0259: Unknown result type (might be due to invalid IL or missing references)
            //IL_0265: Expected O, but got Unknown
            //IL_0272: Unknown result type (might be due to invalid IL or missing references)
            //IL_0277: Unknown result type (might be due to invalid IL or missing references)
            //IL_0282: Expected O, but got Unknown
            //IL_0283: Expected O, but got Unknown
            //IL_0299: Unknown result type (might be due to invalid IL or missing references)
            //IL_029e: Unknown result type (might be due to invalid IL or missing references)
            //IL_02aa: Expected O, but got Unknown
            //IL_02b7: Unknown result type (might be due to invalid IL or missing references)
            //IL_02bc: Unknown result type (might be due to invalid IL or missing references)
            //IL_02c7: Expected O, but got Unknown
            //IL_02c8: Expected O, but got Unknown
            string sql = "INSERT INTO log\r\n\t\t\t\t(ID,Title,Type,WriteTime,UserID,UserName,IPAddress,URL,Contents,Others,OldXml,NewXml) \r\n\t\t\t\tVALUES(@ID,@Title,@Type,@WriteTime,@UserID,@UserName,@IPAddress,@URL,@Contents,@Others,@OldXml,@NewXml)";

            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", 751, -1);

            ((DbParameter)val2).Value = model.Title;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@Type", 253, 50);

            ((DbParameter)val3).Value = model.Type;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@WriteTime", 12, -1);

            ((DbParameter)val4).Value = model.WriteTime;
            obj[3] = val4;
            _003F val5;

            if (model.UserID.HasValue)
            {
                val5 = new MySqlParameter("@UserID", 253, 36);
                ((DbParameter)val5).Value = model.UserID;
            }
            else
            {
                val5 = new MySqlParameter("@UserID", 253, 36);
                ((DbParameter)val5).Value = DBNull.Value;
            }
            obj[4] = val5;
            _003F val6;

            if (model.UserName != null)
            {
                val6 = new MySqlParameter("@UserName", 253, 50);
                ((DbParameter)val6).Value = model.UserName;
            }
            else
            {
                val6 = new MySqlParameter("@UserName", 253, 50);
                ((DbParameter)val6).Value = DBNull.Value;
            }
            obj[5] = val6;
            _003F val7;

            if (model.IPAddress != null)
            {
                val7 = new MySqlParameter("@IPAddress", 253, 50);
                ((DbParameter)val7).Value = model.IPAddress;
            }
            else
            {
                val7 = new MySqlParameter("@IPAddress", 253, 50);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.URL != null)
            {
                val8 = new MySqlParameter("@URL", 751, -1);
                ((DbParameter)val8).Value = model.URL;
            }
            else
            {
                val8 = new MySqlParameter("@URL", 751, -1);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.Contents != null)
            {
                val9 = new MySqlParameter("@Contents", 751, -1);
                ((DbParameter)val9).Value = model.Contents;
            }
            else
            {
                val9 = new MySqlParameter("@Contents", 751, -1);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.Others != null)
            {
                val10 = new MySqlParameter("@Others", 751, -1);
                ((DbParameter)val10).Value = model.Others;
            }
            else
            {
                val10 = new MySqlParameter("@Others", 751, -1);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.OldXml != null)
            {
                val11 = new MySqlParameter("@OldXml", 751, -1);
                ((DbParameter)val11).Value = model.OldXml;
            }
            else
            {
                val11 = new MySqlParameter("@OldXml", 751, -1);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            _003F val12;

            if (model.NewXml != null)
            {
                val12 = new MySqlParameter("@NewXml", 751, -1);
                ((DbParameter)val12).Value = model.NewXml;
            }
            else
            {
                val12 = new MySqlParameter("@NewXml", 751, -1);
                ((DbParameter)val12).Value = DBNull.Value;
            }
            obj[11] = val12;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Example #10
0
        public int Update(RoadFlow.Data.Model.Log 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_0033: Unknown result type (might be due to invalid IL or missing references)
            //IL_0038: Unknown result type (might be due to invalid IL or missing references)
            //IL_0044: Expected O, but got Unknown
            //IL_0045: Expected O, but got Unknown
            //IL_004f: Unknown result type (might be due to invalid IL or missing references)
            //IL_0054: Unknown result type (might be due to invalid IL or missing references)
            //IL_0065: Expected O, but got Unknown
            //IL_0066: Expected O, but got Unknown
            //IL_0081: Unknown result type (might be due to invalid IL or missing references)
            //IL_0086: Unknown result type (might be due to invalid IL or missing references)
            //IL_0097: Expected O, but got Unknown
            //IL_00a2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b2: Expected O, but got Unknown
            //IL_00b3: Expected O, but got Unknown
            //IL_00c6: Unknown result type (might be due to invalid IL or missing references)
            //IL_00cb: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d7: Expected O, but got Unknown
            //IL_00e2: Unknown result type (might be due to invalid IL or missing references)
            //IL_00e7: Unknown result type (might be due to invalid IL or missing references)
            //IL_00f2: Expected O, but got Unknown
            //IL_00f3: Expected O, but got Unknown
            //IL_0106: Unknown result type (might be due to invalid IL or missing references)
            //IL_010b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0117: Expected O, but got Unknown
            //IL_0122: Unknown result type (might be due to invalid IL or missing references)
            //IL_0127: Unknown result type (might be due to invalid IL or missing references)
            //IL_0132: Expected O, but got Unknown
            //IL_0133: Expected O, but got Unknown
            //IL_0144: Unknown result type (might be due to invalid IL or missing references)
            //IL_0149: Unknown result type (might be due to invalid IL or missing references)
            //IL_0155: Expected O, but got Unknown
            //IL_015e: Unknown result type (might be due to invalid IL or missing references)
            //IL_0163: Unknown result type (might be due to invalid IL or missing references)
            //IL_016e: Expected O, but got Unknown
            //IL_016f: Expected O, but got Unknown
            //IL_0180: Unknown result type (might be due to invalid IL or missing references)
            //IL_0185: Unknown result type (might be due to invalid IL or missing references)
            //IL_0191: Expected O, but got Unknown
            //IL_019a: Unknown result type (might be due to invalid IL or missing references)
            //IL_019f: Unknown result type (might be due to invalid IL or missing references)
            //IL_01aa: Expected O, but got Unknown
            //IL_01ab: Expected O, but got Unknown
            //IL_01bc: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cd: Expected O, but got Unknown
            //IL_01d6: Unknown result type (might be due to invalid IL or missing references)
            //IL_01db: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e6: Expected O, but got Unknown
            //IL_01e7: Expected O, but got Unknown
            //IL_01f9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01fe: Unknown result type (might be due to invalid IL or missing references)
            //IL_020a: Expected O, but got Unknown
            //IL_0213: Unknown result type (might be due to invalid IL or missing references)
            //IL_0218: Unknown result type (might be due to invalid IL or missing references)
            //IL_0223: Expected O, but got Unknown
            //IL_0224: Expected O, but got Unknown
            //IL_0236: Unknown result type (might be due to invalid IL or missing references)
            //IL_023b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0247: Expected O, but got Unknown
            //IL_0250: Unknown result type (might be due to invalid IL or missing references)
            //IL_0255: Unknown result type (might be due to invalid IL or missing references)
            //IL_0260: Expected O, but got Unknown
            //IL_0261: Expected O, but got Unknown
            //IL_026d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0272: Unknown result type (might be due to invalid IL or missing references)
            //IL_0283: Expected O, but got Unknown
            //IL_0284: Expected O, but got Unknown
            string sql = "UPDATE Log SET \r\n\t\t\t\tTitle=:Title,Type=:Type,WriteTime=:WriteTime,UserID=:UserID,UserName=:UserName,IPAddress=:IPAddress,URL=:URL,Contents=:Contents,Others=:Others,OldXml=:OldXml,NewXml=:NewXml\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;
            OracleParameter val2 = new OracleParameter(":Type", 119, 100);

            ((DbParameter)val2).Value = model.Type;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":WriteTime", 106, 8);

            ((DbParameter)val3).Value = model.WriteTime;
            obj[2] = val3;
            _003F val4;

            if (model.UserID.HasValue)
            {
                val4 = new OracleParameter(":UserID", 126, 40);
                ((DbParameter)val4).Value = model.UserID;
            }
            else
            {
                val4 = new OracleParameter(":UserID", 126, 40);
                ((DbParameter)val4).Value = DBNull.Value;
            }
            obj[3] = val4;
            _003F val5;

            if (model.UserName != null)
            {
                val5 = new OracleParameter(":UserName", 119, 100);
                ((DbParameter)val5).Value = model.UserName;
            }
            else
            {
                val5 = new OracleParameter(":UserName", 119, 100);
                ((DbParameter)val5).Value = DBNull.Value;
            }
            obj[4] = val5;
            _003F val6;

            if (model.IPAddress != null)
            {
                val6 = new OracleParameter(":IPAddress", 126, 50);
                ((DbParameter)val6).Value = model.IPAddress;
            }
            else
            {
                val6 = new OracleParameter(":IPAddress", 126, 50);
                ((DbParameter)val6).Value = DBNull.Value;
            }
            obj[5] = val6;
            _003F val7;

            if (model.URL != null)
            {
                val7 = new OracleParameter(":URL", 105);
                ((DbParameter)val7).Value = model.URL;
            }
            else
            {
                val7 = new OracleParameter(":URL", 105);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.Contents != null)
            {
                val8 = new OracleParameter(":Contents", 105);
                ((DbParameter)val8).Value = model.Contents;
            }
            else
            {
                val8 = new OracleParameter(":Contents", 105);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.Others != null)
            {
                val9 = new OracleParameter(":Others", 105);
                ((DbParameter)val9).Value = model.Others;
            }
            else
            {
                val9 = new OracleParameter(":Others", 105);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.OldXml != null)
            {
                val10 = new OracleParameter(":OldXml", 105);
                ((DbParameter)val10).Value = model.OldXml;
            }
            else
            {
                val10 = new OracleParameter(":OldXml", 105);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.NewXml != null)
            {
                val11 = new OracleParameter(":NewXml", 105);
                ((DbParameter)val11).Value = model.NewXml;
            }
            else
            {
                val11 = new OracleParameter(":NewXml", 105);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            OracleParameter val12 = new OracleParameter(":ID", 126, 40);

            ((DbParameter)val12).Value = model.ID;
            obj[11] = val12;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
Example #11
0
        public int Add(RoadFlow.Data.Model.Log model)
        {
            //IL_0018: Unknown result type (might be due to invalid IL or missing references)
            //IL_001d: Unknown result type (might be due to invalid IL or missing references)
            //IL_002e: Expected O, but got Unknown
            //IL_002f: Expected O, but got Unknown
            //IL_0038: Unknown result type (might be due to invalid IL or missing references)
            //IL_003d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0049: Expected O, but got Unknown
            //IL_004a: Expected O, but got Unknown
            //IL_0055: Unknown result type (might be due to invalid IL or missing references)
            //IL_005a: Unknown result type (might be due to invalid IL or missing references)
            //IL_0066: Expected O, but got Unknown
            //IL_0067: Expected O, but got Unknown
            //IL_0071: Unknown result type (might be due to invalid IL or missing references)
            //IL_0076: Unknown result type (might be due to invalid IL or missing references)
            //IL_0087: Expected O, but got Unknown
            //IL_0088: Expected O, but got Unknown
            //IL_00a3: Unknown result type (might be due to invalid IL or missing references)
            //IL_00a8: Unknown result type (might be due to invalid IL or missing references)
            //IL_00b9: Expected O, but got Unknown
            //IL_00c4: Unknown result type (might be due to invalid IL or missing references)
            //IL_00c9: Unknown result type (might be due to invalid IL or missing references)
            //IL_00d4: Expected O, but got Unknown
            //IL_00d5: 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_0104: Unknown result type (might be due to invalid IL or missing references)
            //IL_0109: Unknown result type (might be due to invalid IL or missing references)
            //IL_0114: Expected O, but got Unknown
            //IL_0115: Expected O, but got Unknown
            //IL_0128: Unknown result type (might be due to invalid IL or missing references)
            //IL_012d: Unknown result type (might be due to invalid IL or missing references)
            //IL_0139: Expected O, but got Unknown
            //IL_0144: Unknown result type (might be due to invalid IL or missing references)
            //IL_0149: Unknown result type (might be due to invalid IL or missing references)
            //IL_0154: Expected O, but got Unknown
            //IL_0155: Expected O, but got Unknown
            //IL_0166: Unknown result type (might be due to invalid IL or missing references)
            //IL_016b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0177: Expected O, but got Unknown
            //IL_0180: Unknown result type (might be due to invalid IL or missing references)
            //IL_0185: Unknown result type (might be due to invalid IL or missing references)
            //IL_0190: Expected O, but got Unknown
            //IL_0191: 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_01b3: Expected O, but got Unknown
            //IL_01bc: Unknown result type (might be due to invalid IL or missing references)
            //IL_01c1: Unknown result type (might be due to invalid IL or missing references)
            //IL_01cc: Expected O, but got Unknown
            //IL_01cd: Expected O, but got Unknown
            //IL_01df: Unknown result type (might be due to invalid IL or missing references)
            //IL_01e4: Unknown result type (might be due to invalid IL or missing references)
            //IL_01f0: Expected O, but got Unknown
            //IL_01f9: Unknown result type (might be due to invalid IL or missing references)
            //IL_01fe: Unknown result type (might be due to invalid IL or missing references)
            //IL_0209: Expected O, but got Unknown
            //IL_020a: Expected O, but got Unknown
            //IL_021c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0221: Unknown result type (might be due to invalid IL or missing references)
            //IL_022d: Expected O, but got Unknown
            //IL_0236: Unknown result type (might be due to invalid IL or missing references)
            //IL_023b: Unknown result type (might be due to invalid IL or missing references)
            //IL_0246: Expected O, but got Unknown
            //IL_0247: Expected O, but got Unknown
            //IL_0259: Unknown result type (might be due to invalid IL or missing references)
            //IL_025e: Unknown result type (might be due to invalid IL or missing references)
            //IL_026a: Expected O, but got Unknown
            //IL_0273: Unknown result type (might be due to invalid IL or missing references)
            //IL_0278: Unknown result type (might be due to invalid IL or missing references)
            //IL_0283: Expected O, but got Unknown
            //IL_0284: Expected O, but got Unknown
            string sql = "INSERT INTO Log\r\n\t\t\t\t(ID,Title,Type,WriteTime,UserID,UserName,IPAddress,URL,Contents,Others,OldXml,NewXml) \r\n\t\t\t\tVALUES(:ID,:Title,:Type,:WriteTime,:UserID,:UserName,:IPAddress,:URL,:Contents,:Others,:OldXml,:NewXml)";

            OracleParameter[] obj = new OracleParameter[12];
            OracleParameter   val = new OracleParameter(":ID", 126, 40);

            ((DbParameter)val).Value = model.ID;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Title", 119);

            ((DbParameter)val2).Value = model.Title;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":Type", 119, 100);

            ((DbParameter)val3).Value = model.Type;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":WriteTime", 106, 8);

            ((DbParameter)val4).Value = model.WriteTime;
            obj[3] = val4;
            _003F val5;

            if (model.UserID.HasValue)
            {
                val5 = new OracleParameter(":UserID", 126, 40);
                ((DbParameter)val5).Value = model.UserID;
            }
            else
            {
                val5 = new OracleParameter(":UserID", 126, 40);
                ((DbParameter)val5).Value = DBNull.Value;
            }
            obj[4] = val5;
            _003F val6;

            if (model.UserName != null)
            {
                val6 = new OracleParameter(":UserName", 119, 100);
                ((DbParameter)val6).Value = model.UserName;
            }
            else
            {
                val6 = new OracleParameter(":UserName", 119, 100);
                ((DbParameter)val6).Value = DBNull.Value;
            }
            obj[5] = val6;
            _003F val7;

            if (model.IPAddress != null)
            {
                val7 = new OracleParameter(":IPAddress", 126, 50);
                ((DbParameter)val7).Value = model.IPAddress;
            }
            else
            {
                val7 = new OracleParameter(":IPAddress", 126, 50);
                ((DbParameter)val7).Value = DBNull.Value;
            }
            obj[6] = val7;
            _003F val8;

            if (model.URL != null)
            {
                val8 = new OracleParameter(":URL", 105);
                ((DbParameter)val8).Value = model.URL;
            }
            else
            {
                val8 = new OracleParameter(":URL", 105);
                ((DbParameter)val8).Value = DBNull.Value;
            }
            obj[7] = val8;
            _003F val9;

            if (model.Contents != null)
            {
                val9 = new OracleParameter(":Contents", 105);
                ((DbParameter)val9).Value = model.Contents;
            }
            else
            {
                val9 = new OracleParameter(":Contents", 105);
                ((DbParameter)val9).Value = DBNull.Value;
            }
            obj[8] = val9;
            _003F val10;

            if (model.Others != null)
            {
                val10 = new OracleParameter(":Others", 105);
                ((DbParameter)val10).Value = model.Others;
            }
            else
            {
                val10 = new OracleParameter(":Others", 105);
                ((DbParameter)val10).Value = DBNull.Value;
            }
            obj[9] = val10;
            _003F val11;

            if (model.OldXml != null)
            {
                val11 = new OracleParameter(":OldXml", 105);
                ((DbParameter)val11).Value = model.OldXml;
            }
            else
            {
                val11 = new OracleParameter(":OldXml", 105);
                ((DbParameter)val11).Value = DBNull.Value;
            }
            obj[10] = val11;
            _003F val12;

            if (model.NewXml != null)
            {
                val12 = new OracleParameter(":NewXml", 105);
                ((DbParameter)val12).Value = model.NewXml;
            }
            else
            {
                val12 = new OracleParameter(":NewXml", 105);
                ((DbParameter)val12).Value = DBNull.Value;
            }
            obj[11] = val12;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }