|
@@ -561,7 +561,7 @@ public class Network
|
|
|
db = dbUtil.OpenDB(ApexTrackingApplication.get_instance(),
|
|
db = dbUtil.OpenDB(ApexTrackingApplication.get_instance(),
|
|
|
null, true);
|
|
null, true);
|
|
|
String sql = "insert into fields_info(name,aname,field_type,function_name,behavior,priority,show,user) values(?,?,?,?,?,?,?,?)";
|
|
String sql = "insert into fields_info(name,aname,field_type,function_name,behavior,priority,show,user) values(?,?,?,?,?,?,?,?)";
|
|
|
- String sql1 = "insert into actions_info(name,function_name,user) values(?,?,?)";
|
|
|
|
|
|
|
+ String sql1 = "insert into actions_info(name,function_name,user,priority) values(?,?,?,?)";
|
|
|
db.execSQL("update fields_info set abandon = 1 where user ='"
|
|
db.execSQL("update fields_info set abandon = 1 where user ='"
|
|
|
+ user + "'");
|
|
+ user + "'");
|
|
|
db.execSQL("update actions_info set abandon = 1 where user ='"
|
|
db.execSQL("update actions_info set abandon = 1 where user ='"
|
|
@@ -658,9 +658,8 @@ public class Network
|
|
|
// certain function
|
|
// certain function
|
|
|
{
|
|
{
|
|
|
String actionname = (String) itactions.next();
|
|
String actionname = (String) itactions.next();
|
|
|
- boolean b = objbehavior.getBoolean(actionname);
|
|
|
|
|
- if (b == false)
|
|
|
|
|
- continue;
|
|
|
|
|
|
|
+ int action_priority = objbehavior.getInt(actionname);
|
|
|
|
|
+
|
|
|
|
|
|
|
|
int id = dbUtil.get_recordid(db, "actions_info",
|
|
int id = dbUtil.get_recordid(db, "actions_info",
|
|
|
"name='" + actionname + "' and function_name='"
|
|
"name='" + actionname + "' and function_name='"
|
|
@@ -668,7 +667,7 @@ public class Network
|
|
|
+ "'");
|
|
+ "'");
|
|
|
if (id >= 0) // record exist;
|
|
if (id >= 0) // record exist;
|
|
|
{
|
|
{
|
|
|
- db.execSQL("update actions_info set abandon = 0 where _id ="
|
|
|
|
|
|
|
+ db.execSQL("update actions_info set abandon = 0 , priority="+action_priority+" where _id ="
|
|
|
+ id);
|
|
+ id);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
@@ -676,6 +675,7 @@ public class Network
|
|
|
stat1.bindString(1, actionname);
|
|
stat1.bindString(1, actionname);
|
|
|
stat1.bindString(2, func_name);
|
|
stat1.bindString(2, func_name);
|
|
|
stat1.bindString(3, user);
|
|
stat1.bindString(3, user);
|
|
|
|
|
+ stat1.bindLong(4, action_priority);
|
|
|
stat1.executeInsert();
|
|
stat1.executeInsert();
|
|
|
|
|
|
|
|
}
|
|
}
|