Esempio n. 1
0
        public int Update(RoadFlow.Data.Model.HastenLog model)
        {
            string sql = "UPDATE HastenLog SET \r\n\t\t\t\tOthersParams=@OthersParams,Users=@Users,Types=@Types,Contents=@Contents,SendUser=@SendUser,SendUserName=@SendUserName,SendTime=@SendTime\r\n\t\t\t\tWHERE ID=@ID";

            SqlParameter[] sqlParameterArray = new SqlParameter[8];
            int            index1            = 0;
            SqlParameter   sqlParameter1     = new SqlParameter("@OthersParams", SqlDbType.VarChar, 5000);

            sqlParameter1.Value       = (object)model.OthersParams;
            sqlParameterArray[index1] = sqlParameter1;
            int          index2        = 1;
            SqlParameter sqlParameter2 = new SqlParameter("@Users", SqlDbType.VarChar, 5000);

            sqlParameter2.Value       = (object)model.Users;
            sqlParameterArray[index2] = sqlParameter2;
            int          index3        = 2;
            SqlParameter sqlParameter3 = new SqlParameter("@Types", SqlDbType.VarChar, 500);

            sqlParameter3.Value       = (object)model.Types;
            sqlParameterArray[index3] = sqlParameter3;
            int          index4        = 3;
            SqlParameter sqlParameter4 = new SqlParameter("@Contents", SqlDbType.NVarChar, 1000);

            sqlParameter4.Value       = (object)model.Contents;
            sqlParameterArray[index4] = sqlParameter4;
            int          index5        = 4;
            SqlParameter sqlParameter5 = new SqlParameter("@SendUser", SqlDbType.UniqueIdentifier, -1);

            sqlParameter5.Value       = (object)model.SendUser;
            sqlParameterArray[index5] = sqlParameter5;
            int          index6        = 5;
            SqlParameter sqlParameter6 = new SqlParameter("@SendUserName", SqlDbType.NVarChar, 100);

            sqlParameter6.Value       = (object)model.SendUserName;
            sqlParameterArray[index6] = sqlParameter6;
            int          index7        = 6;
            SqlParameter sqlParameter7 = new SqlParameter("@SendTime", SqlDbType.DateTime, 8);

            sqlParameter7.Value       = (object)model.SendTime;
            sqlParameterArray[index7] = sqlParameter7;
            int          index8        = 7;
            SqlParameter sqlParameter8 = new SqlParameter("@ID", SqlDbType.UniqueIdentifier, -1);

            sqlParameter8.Value       = (object)model.ID;
            sqlParameterArray[index8] = sqlParameter8;
            SqlParameter[] parameter = sqlParameterArray;
            return(this.dbHelper.Execute(sql, parameter, false));
        }
Esempio n. 2
0
        public int Update(RoadFlow.Data.Model.HastenLog model)
        {
            string sql = "UPDATE HastenLog SET \r\n\t\t\t\tOthersParams=:OthersParams,Users=:Users,Types=:Types,Contents=:Contents,SendUser=:SendUser,SendUserName=:SendUserName,SendTime=:SendTime\r\n\t\t\t\tWHERE ID=:ID";

            OracleParameter[] oracleParameterArray = new OracleParameter[8];
            int             index1           = 0;
            OracleParameter oracleParameter1 = new OracleParameter(":OthersParams", OracleDbType.Varchar2);

            oracleParameter1.Value       = (object)model.OthersParams;
            oracleParameterArray[index1] = oracleParameter1;
            int             index2           = 1;
            OracleParameter oracleParameter2 = new OracleParameter(":Users", OracleDbType.Varchar2);

            oracleParameter2.Value       = (object)model.Users;
            oracleParameterArray[index2] = oracleParameter2;
            int             index3           = 2;
            OracleParameter oracleParameter3 = new OracleParameter(":Types", OracleDbType.Varchar2);

            oracleParameter3.Value       = (object)model.Types;
            oracleParameterArray[index3] = oracleParameter3;
            int             index4           = 3;
            OracleParameter oracleParameter4 = new OracleParameter(":Contents", OracleDbType.NVarchar2);

            oracleParameter4.Value       = (object)model.Contents;
            oracleParameterArray[index4] = oracleParameter4;
            int             index5           = 4;
            OracleParameter oracleParameter5 = new OracleParameter(":SendUser", OracleDbType.Varchar2);

            oracleParameter5.Value       = (object)model.SendUser;
            oracleParameterArray[index5] = oracleParameter5;
            int             index6           = 5;
            OracleParameter oracleParameter6 = new OracleParameter(":SendUserName", OracleDbType.Varchar2);

            oracleParameter6.Value       = (object)model.SendUserName;
            oracleParameterArray[index6] = oracleParameter6;
            int             index7           = 6;
            OracleParameter oracleParameter7 = new OracleParameter(":SendTime", OracleDbType.Date);

            oracleParameter7.Value       = (object)model.SendTime;
            oracleParameterArray[index7] = oracleParameter7;
            int             index8           = 7;
            OracleParameter oracleParameter8 = new OracleParameter(":ID", OracleDbType.Varchar2);

            oracleParameter8.Value       = (object)model.ID;
            oracleParameterArray[index8] = oracleParameter8;
            OracleParameter[] parameter = oracleParameterArray;
            return(this.dbHelper.Execute(sql, parameter));
        }
Esempio n. 3
0
        public int Update(RoadFlow.Data.Model.HastenLog model)
        {
            string sql = "UPDATE hastenlog SET \r\n\t\t\t\tOthersParams=@OthersParams,Users=@Users,Types=@Types,Contents=@Contents,SendUser=@SendUser,SendUserName=@SendUserName,SendTime=@SendTime\r\n\t\t\t\tWHERE ID=@ID";

            MySqlParameter[] mySqlParameterArray = new MySqlParameter[8];
            int            index1          = 0;
            MySqlParameter mySqlParameter1 = new MySqlParameter("@OthersParams", MySqlDbType.Text, -1);

            mySqlParameter1.Value       = (object)model.OthersParams;
            mySqlParameterArray[index1] = mySqlParameter1;
            int            index2          = 1;
            MySqlParameter mySqlParameter2 = new MySqlParameter("@Users", MySqlDbType.Text, -1);

            mySqlParameter2.Value       = (object)model.Users;
            mySqlParameterArray[index2] = mySqlParameter2;
            int            index3          = 2;
            MySqlParameter mySqlParameter3 = new MySqlParameter("@Types", MySqlDbType.Text, -1);

            mySqlParameter3.Value       = (object)model.Types;
            mySqlParameterArray[index3] = mySqlParameter3;
            int            index4          = 3;
            MySqlParameter mySqlParameter4 = new MySqlParameter("@Contents", MySqlDbType.Text, -1);

            mySqlParameter4.Value       = (object)model.Contents;
            mySqlParameterArray[index4] = mySqlParameter4;
            int            index5          = 4;
            MySqlParameter mySqlParameter5 = new MySqlParameter("@SendUser", MySqlDbType.VarChar, 36);

            mySqlParameter5.Value       = (object)model.SendUser;
            mySqlParameterArray[index5] = mySqlParameter5;
            int            index6          = 5;
            MySqlParameter mySqlParameter6 = new MySqlParameter("@SendUserName", MySqlDbType.VarChar, 50);

            mySqlParameter6.Value       = (object)model.SendUserName;
            mySqlParameterArray[index6] = mySqlParameter6;
            int            index7          = 6;
            MySqlParameter mySqlParameter7 = new MySqlParameter("@SendTime", MySqlDbType.DateTime, -1);

            mySqlParameter7.Value       = (object)model.SendTime;
            mySqlParameterArray[index7] = mySqlParameter7;
            int            index8          = 7;
            MySqlParameter mySqlParameter8 = new MySqlParameter("@ID", MySqlDbType.VarChar, 36);

            mySqlParameter8.Value       = (object)model.ID;
            mySqlParameterArray[index8] = mySqlParameter8;
            MySqlParameter[] parameter = mySqlParameterArray;
            return(this.dbHelper.Execute(sql, parameter, false));
        }
Esempio n. 4
0
 public int Update(RoadFlow.Data.Model.HastenLog model)
 {
     return(this.dataHastenLog.Update(model));
 }
Esempio n. 5
0
 public int Add(RoadFlow.Data.Model.HastenLog model)
 {
     return(this.dataHastenLog.Add(model));
 }