예제 #1
0
        public int Update(RoadFlow.Data.Model.UsersRelation model)
        {
            string sql = "UPDATE UsersRelation SET \r\n\t\t\t\tIsMain=@IsMain,Sort=@Sort\r\n\t\t\t\tWHERE UserID=@UserID and OrganizeID=@OrganizeID";

            SqlParameter[] parameter = new SqlParameter[4]
            {
                new SqlParameter("@IsMain", SqlDbType.Int, -1)
                {
                    Value = model.IsMain
                },
                new SqlParameter("@Sort", SqlDbType.Int, -1)
                {
                    Value = model.Sort
                },
                new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.UserID
                },
                new SqlParameter("@OrganizeID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.OrganizeID
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
예제 #2
0
        public int Add(RoadFlow.Data.Model.UsersRelation model)
        {
            string sql = "INSERT INTO UsersRelation\r\n\t\t\t\t(UserID,OrganizeID,IsMain,Sort) \r\n\t\t\t\tVALUES(@UserID,@OrganizeID,@IsMain,@Sort)";

            SqlParameter[] parameter = new SqlParameter[4]
            {
                new SqlParameter("@UserID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.UserID
                },
                new SqlParameter("@OrganizeID", SqlDbType.UniqueIdentifier, -1)
                {
                    Value = model.OrganizeID
                },
                new SqlParameter("@IsMain", SqlDbType.Int, -1)
                {
                    Value = model.IsMain
                },
                new SqlParameter("@Sort", SqlDbType.Int, -1)
                {
                    Value = model.Sort
                }
            };
            return(dbHelper.Execute(sql, parameter));
        }
예제 #3
0
        private List <RoadFlow.Data.Model.UsersRelation> DataReaderToList(MySqlDataReader dataReader)
        {
            List <RoadFlow.Data.Model.UsersRelation> list = new List <RoadFlow.Data.Model.UsersRelation>();

            RoadFlow.Data.Model.UsersRelation usersRelation = null;
            while (((DbDataReader)dataReader).Read())
            {
                usersRelation            = new RoadFlow.Data.Model.UsersRelation();
                usersRelation.UserID     = ((DbDataReader)dataReader).GetString(0).ToGuid();
                usersRelation.OrganizeID = ((DbDataReader)dataReader).GetString(1).ToGuid();
                usersRelation.IsMain     = ((DbDataReader)dataReader).GetInt32(2);
                usersRelation.Sort       = ((DbDataReader)dataReader).GetInt32(3);
                list.Add(usersRelation);
            }
            return(list);
        }
예제 #4
0
        private List <RoadFlow.Data.Model.UsersRelation> DataReaderToList(SqlDataReader dataReader)
        {
            List <RoadFlow.Data.Model.UsersRelation> list = new List <RoadFlow.Data.Model.UsersRelation>();

            RoadFlow.Data.Model.UsersRelation usersRelation = null;
            while (dataReader.Read())
            {
                usersRelation            = new RoadFlow.Data.Model.UsersRelation();
                usersRelation.UserID     = dataReader.GetGuid(0);
                usersRelation.OrganizeID = dataReader.GetGuid(1);
                usersRelation.IsMain     = dataReader.GetInt32(2);
                usersRelation.Sort       = dataReader.GetInt32(3);
                list.Add(usersRelation);
            }
            return(list);
        }
예제 #5
0
        public int Update(RoadFlow.Data.Model.UsersRelation 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_0037: Unknown result type (might be due to invalid IL or missing references)
            //IL_003c: Unknown result type (might be due to invalid IL or missing references)
            //IL_004d: Expected O, but got Unknown
            //IL_004e: Expected O, but got Unknown
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_0061: Unknown result type (might be due to invalid IL or missing references)
            //IL_0072: Expected O, but got Unknown
            //IL_0073: 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_0098: Expected O, but got Unknown
            string sql = "UPDATE usersrelation SET \r\n\t\t\t\tIsMain=@IsMain,Sort=@Sort\r\n\t\t\t\tWHERE UserID=@UserID and OrganizeID=@OrganizeID";

            MySqlParameter[] obj = new MySqlParameter[4];
            MySqlParameter   val = new MySqlParameter("@IsMain", 3, 11);

            ((DbParameter)val).Value = model.IsMain;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@Sort", 3, 11);

            ((DbParameter)val2).Value = model.Sort;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@UserID", 253, 36);

            ((DbParameter)val3).Value = model.UserID;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@OrganizeID", 253, 36);

            ((DbParameter)val4).Value = model.OrganizeID;
            obj[3] = val4;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #6
0
        public int Add(RoadFlow.Data.Model.UsersRelation 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_0030: Expected O, but got Unknown
            //IL_0031: 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_0055: Expected O, but got Unknown
            //IL_0056: Expected O, but got Unknown
            //IL_0060: Unknown result type (might be due to invalid IL or missing references)
            //IL_0065: Unknown result type (might be due to invalid IL or missing references)
            //IL_0076: Expected O, but got Unknown
            //IL_0077: 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_0098: Expected O, but got Unknown
            string sql = "INSERT INTO usersrelation\r\n\t\t\t\t(UserID,OrganizeID,IsMain,Sort) \r\n\t\t\t\tVALUES(@UserID,@OrganizeID,@IsMain,@Sort)";

            MySqlParameter[] obj = new MySqlParameter[4];
            MySqlParameter   val = new MySqlParameter("@UserID", 253, 36);

            ((DbParameter)val).Value = model.UserID;
            obj[0] = val;
            MySqlParameter val2 = new MySqlParameter("@OrganizeID", 253, 36);

            ((DbParameter)val2).Value = model.OrganizeID;
            obj[1] = val2;
            MySqlParameter val3 = new MySqlParameter("@IsMain", 3, 11);

            ((DbParameter)val3).Value = model.IsMain;
            obj[2] = val3;
            MySqlParameter val4 = new MySqlParameter("@Sort", 3, 11);

            ((DbParameter)val4).Value = model.Sort;
            obj[3] = val4;
            MySqlParameter[] parameter = (MySqlParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #7
0
        public int Update(RoadFlow.Data.Model.UsersRelation model)
        {
            //IL_0015: Unknown result type (might be due to invalid IL or missing references)
            //IL_001a: 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_0035: Unknown result type (might be due to invalid IL or missing references)
            //IL_003a: 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_0057: Unknown result type (might be due to invalid IL or missing references)
            //IL_005c: Unknown result type (might be due to invalid IL or missing references)
            //IL_006d: Expected O, but got Unknown
            //IL_006e: Expected O, but got Unknown
            //IL_0079: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Unknown result type (might be due to invalid IL or missing references)
            //IL_008f: Expected O, but got Unknown
            //IL_0090: Expected O, but got Unknown
            string sql = "UPDATE UsersRelation SET \r\n\t\t\t\tIsMain=:IsMain,Sort=:Sort\r\n\t\t\t\tWHERE UserID=:UserID and OrganizeID=:OrganizeID";

            OracleParameter[] obj = new OracleParameter[4];
            OracleParameter   val = new OracleParameter(":IsMain", 112);

            ((DbParameter)val).Value = model.IsMain;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":Sort", 112);

            ((DbParameter)val2).Value = model.Sort;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":UserID", 126, 40);

            ((DbParameter)val3).Value = model.UserID;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":OrganizeID", 126, 40);

            ((DbParameter)val4).Value = model.OrganizeID;
            obj[3] = val4;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #8
0
        public int Add(RoadFlow.Data.Model.UsersRelation model)
        {
            //IL_0017: Unknown result type (might be due to invalid IL or missing references)
            //IL_001c: Unknown result type (might be due to invalid IL or missing references)
            //IL_002d: Expected O, but got Unknown
            //IL_002e: 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_004f: Expected O, but got Unknown
            //IL_0050: 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_006f: Expected O, but got Unknown
            //IL_0070: Expected O, but got Unknown
            //IL_0079: Unknown result type (might be due to invalid IL or missing references)
            //IL_007e: Unknown result type (might be due to invalid IL or missing references)
            //IL_008f: Expected O, but got Unknown
            //IL_0090: Expected O, but got Unknown
            string sql = "INSERT INTO UsersRelation\r\n\t\t\t\t(UserID,OrganizeID,IsMain,Sort) \r\n\t\t\t\tVALUES(:UserID,:OrganizeID,:IsMain,:Sort)";

            OracleParameter[] obj = new OracleParameter[4];
            OracleParameter   val = new OracleParameter(":UserID", 126, 40);

            ((DbParameter)val).Value = model.UserID;
            obj[0] = val;
            OracleParameter val2 = new OracleParameter(":OrganizeID", 126, 40);

            ((DbParameter)val2).Value = model.OrganizeID;
            obj[1] = val2;
            OracleParameter val3 = new OracleParameter(":IsMain", 112);

            ((DbParameter)val3).Value = model.IsMain;
            obj[2] = val3;
            OracleParameter val4 = new OracleParameter(":Sort", 112);

            ((DbParameter)val4).Value = model.Sort;
            obj[3] = val4;
            OracleParameter[] parameter = (OracleParameter[])obj;
            return(dbHelper.Execute(sql, parameter));
        }
예제 #9
0
 public int Update(RoadFlow.Data.Model.UsersRelation model)
 {
     return(dataUsersRelation.Update(model));
 }
예제 #10
0
 public int Add(RoadFlow.Data.Model.UsersRelation model)
 {
     return(dataUsersRelation.Add(model));
 }