public string NamHocMoi()
        {
            string    a;
            DataTable table = NamHoc.LayNamHoc();
            int       max   = 0;

            for (int i = 0; i < table.Rows.Count; i++)
            {
                if (int.Parse(table.Rows[i][1].ToString().Substring(0, 4)) > max)
                {
                    max = int.Parse(table.Rows[i][1].ToString().Substring(0, 4));
                }
            }
            if (max == 0)
            {
                DateTime time = DateTime.Now;
                max = time.Year;
            }
            a = (max + 1).ToString() + " - " + (max + 2).ToString();
            return(a);
        }
示例#2
0
 public DataTable LayNamHoc()
 {
     return(NhapDiem.LayNamHoc());
 }