public void getProductFamily(string clientID) { try { MySQLBusinessLogic bl = new MySQLBusinessLogic(); DataTable dt = new DataTable(); dt = bl.GetProductFamily(); if (dt.Rows.Count > 0) { string json = ""; json = ConvertDataTabletoString(dt); Clients.Client(clientID).gotProductFamily(json); } else Clients.Client(clientID).gotProductFamily(""); } catch (Exception ex) { Clients.Client(clientID).gotProductFamily(""); } }