public string GetFilter(int companyId, DateTime?from, DateTime?to, int status) { var filter = new StringBuilder("{"); filter.Append(Tools.JsonPair("companyId", companyId)).Append(","); filter.Append(Tools.JsonPair("from", from)).Append(","); filter.Append(Tools.JsonPair("to", to)).Append(","); filter.Append(Tools.JsonPair("status", status)).Append("}"); Session["ObjetivoFilter"] = filter.ToString(); return(Objetivo.FilterList(companyId, from, to, status)); }