Actionscript
function getMessageCengerWdgData() {
this.getUserAssignedTasks_Result = function(result) {
var Count:Number = 0;
Count = result.items.length;
if (Count>1 || Count == 0) {
task_mc.task_txt.text = Count+' '+'THINGS TO DO';
} else {
task_mc.task_txt.text = Count+' '+'THING TO DO';
}
var navmessage =
_level0.gateway_conn.getService(_level0.servicepath+"cfc.mail", this);
navmessage.NewMail();
this.NewMail_Result = function(result) {
var newmail = result.items[0].newMailCount;
if (newmail>1) {
email_mc.emailmessage_text.text = newmail+'
'+'MESSAGES';
} else {
email_mc.emailmessage_text.text = newmail+'
'+'MESSAGE';
}
loader_mc._visible = false;
};
};
var taskcfc =
_level0.gateway_conn.getService(_level0.servicepath+"cfc.task", this);
taskcfc.getUserAssignedTasks();
}
Coldfusion
<cffunction name="getUserAssignedTasks" output="false" returntype="query"
access="remote" hint="This code retreives a user's assigned task information.">
<cfargument name="UserID" type="string" required="no"
default="#session.sessionarray.userid#">
<cfargument name="ProjectID" type="string" required="no"
default="#session.sessionarray.projectid#">
<cfset var getUserAssignedTasks =
application.task_queries.getUserAssignedTasks(UserID=arguments.UserID,ProjectID=arguments.ProjectID)>
<cfreturn getUserAssignedTasks>
</cffunction>
which goes to this one in the task_queries.cfc
<cffunction name="GetUserAssignedTasks" output="false" returntype="any"
hint="This query returns the assigned tasks for a user per project.">
<CFargument name="UserID" type="string" required="yes"
default="">
<CFargument name="ProjectID" type="string" required="yes"
default="">
<cfargument name="Datasource" type="string" required="no"
default="#Application.serversettings.DataSource#">
<cfset var rs_GetUserAssignedTasks = "">
<cfstoredproc datasource="#arguments.Datasource#"
procedure="Task_GetUserAssignedTasks">
<cfprocparam dbvarname="@UserID"
cfsqltype="cf_sql_varchar" value="#UserID#">
<cfprocparam dbvarname="@ProjectID"
cfsqltype="cf_sql_varchar" value="#ProjectID#">
<cfprocresult resultset="1"
name="rs_GetUserAssignedTasks">
</cfstoredproc>
<cfreturn rs_GetUserAssignedTasks>
</cffunction>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:204534
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54