public static string getVisitDetail(int type) { string where = string.Empty; switch (type) { case 1: where = " a_customerSourceType=1 "; break; case 2: where = " a_customerSourceType=2 "; break; case 3: where = " a_customerSourceType=3 "; break; case 4: where = " a_otherSoftwareType=1 "; break; case 5: where = " a_otherSoftwareType=2 "; break; default: break; } if (string.IsNullOrEmpty(where)) { return("[]"); } else { List <dynamic> ds = CustomerCareBLL.getVisitDetail(where); if (ds != null && ds.Count > 0) { string jsonDt = setVisitAnalyzeDetail(ds); return(jsonDt); } else { return("[]"); } } }