public static string LookupValueWithFilter(int set, string filter, string dutylog, string formcontrol)
{
StringBuilder ret = new StringBuilder("");
ret.AppendFormat("select * from LookupValueTbl lf left join dutylogcombofiltertbl dlcf on lf.fkLookupSetID = dlcf.fklookupsetid Where dlcf.fkLookupSetID = {0} and fkformcontrolid = {1} and fkdutylogid = {2} and lf.filtercode = dlcf.filtercode Order By SortOrder, LookupText", set, formcontrol, dutylog, filter);
return ret.ToString();
}