public string getBalance(int taiKhoan) { try { if (KetNoiThietBi()) { return(sms.GetBalances(serialPort, taiKhoan)); } } catch (Exception ex) { closeConnect(); File.AppendAllText(@"C:\netmd.log", "Message:" + ex.Message + "\r\n"); File.AppendAllText(@"C:\netmd.log", "StackTrace:" + ex.StackTrace + "\r\n"); File.AppendAllText(@"C:\netmd.log", "========================================================\r\n"); } return(""); }