private string GetMa() { SinhVienBUL cls = new SinhVienBUL(); DataTable a = cls.SinhMa(); //for (int i = 0; i < a.Rows.Count - 1; i++) //{ // for (int j = 0; j < a.Columns.Count - 1; j++) // { // string x = a.Rows[i][j].ToString(); // } //} string x = a.Rows[0][0].ToString(); string getMaSV = "00" + x; getMaSV = getMaSV.Substring(getMaSV.Length - 3, 3); return("SV" + getMaSV); }