<?xml version="1.0" encoding="UTF-8"?>
<!-- Evolutility - (c) 2008 Olivier Giulieri - www.evolutility.com  -->

<form label="To Do" xmlns="http://www.evolutility.com">
	
<data entity="task" entities="tasks" icon="todo.gif" 
 dbtable="EVOL_ToDo" dborder="PriorityID, duedate"   
 dbcolumnlead="title" 
 splogin="EvoSP_Login @login, @password" 
 sppaging="EvoSP_PagedItem @SQLselect, @SQLtable, @SQLfrom, @SQLwhere, @SQLorderby, @SQLpk, @pageid, @pagesize" />
	
	<panel label="Task" width="62" >
		   
		<field type="text" label="Title" cssclass="fieldmain" width="100" 
			   dbcolumn="title" dbcolumnread="title" required="1" maxlength="255"
			   search="1" searchlist="1" searchadv="1" />
		
		<field type="date" label="Due Date" maxlength="10" width="40"
			   dbcolumn="duedate" dbcolumnread="duedate" 
			   search="1" searchlist="1" searchadv="1"  />
		
		<field type="lov" required="1" label="Priority" width="60" 
			   dbcolumn="PriorityID" dbcolumnread="Priority" dbtablelov="EVOL_ToDoPriority" dborderlov="id" 
			   search="1" searchlist="1" searchadv="1"/>
	</panel>
	
	<panel label="Status" width="38">
		   
		<field type="lov" label="Category" width="100" 
			   dbcolumn="CategoryID" dbcolumnread="Category" dbtablelov="EVOL_ToDoCategory" dborderlov="name" 
			   search="1" searchlist="1" searchadv="1"  />
		
		<field type="boolean" label="Complete" labellist="C." img="checkb.gif" width="50"
			   dbcolumn="Complete" dbcolumnread="Complete"  
			   search="1" searchlist="1" searchadv="1"/>
	</panel>
	
	<panel label="Notes" width="100">
		   
		<field type="textmultiline" label="" labeledit="Notes" labellist="Notes" width="100" height="6" 
			   dbcolumn="notes" dbcolumnread="notes" maxlength="1000"			   
			   search="0" searchlist="0" searchadv="1" />
	</panel>
	
     <queries label="Selections">
        <query label="Urgent tasks" dbwhere="t.complete=0 AND categoryid&lt;3" url="asap" />
        <query label="Open tasks due in less than a week" dbwhere="t.complete=0 AND (datediff(Day,getdate(),duedate)&lt;7 AND datediff(Day,getdate(),duedate)&gt;-1)" url="thisweek" />
        <query label="Open tasks due in less than a month" dbwhere="t.complete=0 AND (datediff(m,getdate(),duedate)&lt;7 AND datediff(m,getdate(),duedate)&gt;-1)" url="thismonth" />
        <query label="Business and Finances tasks" dbwhere="categoryid in (4,6)" url="biz" />
        <query label="Open tasks" dbwhere="t.complete=0" url="open" />
        <query label="Completed tasks" dbwhere="t.complete=1" url="closed" />
    </queries>
	
</form> 