AP Invoice v2: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 5:
# '''NetTotal''' is the sum of amount & GST from details, this field is '''ReadOnly'''.
# Total '''GST''' is the sum of GST & GST Adjustment from details, this field is '''ReadOnly'''.
# Do not set '''empty string''' to '''ProjNo''' and '''DeptNo''', when it is empty, set to '''null''' or '''DBNull.Value'''.
#*Note that when '''null''' is assigned to a field, the value of the field is converted to '''DBNull.Value'''.<syntaxhighlight lang="csharp">
dtl.ProjNo = null;
if (dtl.ProjNo == null)
AutoCount.AppMessage.ShowMessage("Project is empty.");
else
AutoCount.AppMessage.ShowMessage("Project has value.");
</syntaxhighlight>
#:The above code will always prompt "Project has value".
#*When change '''null''' to '''DBNull.Value''' in the comparison<syntaxhighlight lang="csharp">
dtl.ProjNo = null;
if (dtl.ProjNo == DBNull.Value)
AutoCount.AppMessage.ShowMessage("Project is empty.");
else
AutoCount.AppMessage.ShowMessage("Project has value.");
</syntaxhighlight>
#:The above code will prompt "Project is empty."
 
<br />
==Assemblies References of AutoCount Accounting version 2.0==
{{BaseReferenceAC20}}