Ejemplo n.º 1
0
        public bool Add_Operate(Model_FileSyncExecRecord model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("insert into FileSyncExecRecord(");
            builder.Append("FileSyncExecRecord_id,FileSyncExecRecord_Type,FileSyncExecRecord_TimeStart,FileSyncExecRecord_TimeEnd,FileSyncExecRecord_Status,FileSyncExecRecord_Condition,createUser,FileSyncExecRecord_Remark)");
            builder.Append(" values (");
            builder.Append("@FileSyncExecRecord_id,@FileSyncExecRecord_Type,@FileSyncExecRecord_TimeStart,@FileSyncExecRecord_TimeEnd,@FileSyncExecRecord_Status,@FileSyncExecRecord_Condition,@createUser,@FileSyncExecRecord_Remark)");
            SqlParameter[] cmdParms = new SqlParameter[] { new SqlParameter("@FileSyncExecRecord_id", SqlDbType.Char, 0x24), new SqlParameter("@FileSyncExecRecord_Type", SqlDbType.VarChar, 30), new SqlParameter("@FileSyncExecRecord_TimeStart", SqlDbType.DateTime), new SqlParameter("@FileSyncExecRecord_TimeEnd", SqlDbType.DateTime), new SqlParameter("@FileSyncExecRecord_Status", SqlDbType.VarChar, 10), new SqlParameter("@FileSyncExecRecord_Condition", SqlDbType.VarChar, 100), new SqlParameter("@createUser", SqlDbType.Char, 0x24), new SqlParameter("@FileSyncExecRecord_Remark", SqlDbType.VarChar, 0x3e8) };
            cmdParms[0].Value = model.FileSyncExecRecord_id;
            cmdParms[1].Value = model.FileSyncExecRecord_Type;
            cmdParms[2].Value = model.FileSyncExecRecord_TimeStart;
            cmdParms[3].Value = model.FileSyncExecRecord_TimeEnd;
            cmdParms[4].Value = model.FileSyncExecRecord_Status;
            cmdParms[5].Value = model.FileSyncExecRecord_Condition;
            cmdParms[6].Value = model.createUser;
            cmdParms[7].Value = model.FileSyncExecRecord_Remark;
            return(DbHelperSQL_Operate.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }
Ejemplo n.º 2
0
        public bool Update_Operate(Model_FileSyncExecRecord model)
        {
            StringBuilder builder = new StringBuilder();

            builder.Append("update FileSyncExecRecord set ");
            builder.Append("FileSyncExecRecord_Type=@FileSyncExecRecord_Type,");
            builder.Append("FileSyncExecRecord_TimeStart=@FileSyncExecRecord_TimeStart,");
            builder.Append("FileSyncExecRecord_TimeEnd=@FileSyncExecRecord_TimeEnd,");
            builder.Append("FileSyncExecRecord_Status=@FileSyncExecRecord_Status,");
            builder.Append("FileSyncExecRecord_Condition=@FileSyncExecRecord_Condition,");
            builder.Append("createUser=@createUser,");
            builder.Append("FileSyncExecRecord_Remark=@FileSyncExecRecord_Remark");
            builder.Append(" where FileSyncExecRecord_id=@FileSyncExecRecord_id ");
            SqlParameter[] cmdParms = new SqlParameter[] { new SqlParameter("@FileSyncExecRecord_Type", SqlDbType.VarChar, 30), new SqlParameter("@FileSyncExecRecord_TimeStart", SqlDbType.DateTime), new SqlParameter("@FileSyncExecRecord_TimeEnd", SqlDbType.DateTime), new SqlParameter("@FileSyncExecRecord_Status", SqlDbType.VarChar, 10), new SqlParameter("@FileSyncExecRecord_Condition", SqlDbType.VarChar, 100), new SqlParameter("@createUser", SqlDbType.Char, 0x24), new SqlParameter("@FileSyncExecRecord_Remark", SqlDbType.VarChar, 0x3e8), new SqlParameter("@FileSyncExecRecord_id", SqlDbType.Char, 0x24) };
            cmdParms[0].Value = model.FileSyncExecRecord_Type;
            cmdParms[1].Value = model.FileSyncExecRecord_TimeStart;
            cmdParms[2].Value = model.FileSyncExecRecord_TimeEnd;
            cmdParms[3].Value = model.FileSyncExecRecord_Status;
            cmdParms[4].Value = model.FileSyncExecRecord_Condition;
            cmdParms[5].Value = model.createUser;
            cmdParms[6].Value = model.FileSyncExecRecord_Remark;
            cmdParms[7].Value = model.FileSyncExecRecord_id;
            return(DbHelperSQL_Operate.ExecuteSql(builder.ToString(), cmdParms) > 0);
        }