public void isLimitReached(string phone, string clientID) { try { MySQLBusinessLogic bl = new MySQLBusinessLogic(); DataTable dt = bl.GetStoreID(phone); int storeID = Convert.ToInt32(dt.Rows[0].ItemArray[0]); int result = bl.ProductLimitReached(retailerProductLimit, phone, storeID); // 1- Limit reached // 2- about to reach - nearby // 3- not reached limit if (result == 1) Clients.Client(clientID).limitReached("1", retailerProductLimit); else if (result == 2) Clients.Client(clientID).limitReached("2", retailerProductLimit); else if (result == 3) Clients.Client(clientID).limitReached("3", retailerProductLimit); else Clients.Client(clientID).limitReached("0", retailerProductLimit); } catch (Exception ex) { Clients.Client(clientID).limitReached("0"); //LogFile(ex.Message, ex.ToString(), email); } }