Ejemplo n.º 1
0
        public string LayMaLonNhat()
        {
            string MaTKLonNhat = tkDAO.LayMaLonNhat();

            if (string.IsNullOrEmpty(MaTKLonNhat))
            {
                return("TK001");
            }
            // loại bỏ chữ NV
            string MaMAX        = MaTKLonNhat.Replace("TK", " ");
            int    SoMAX        = int.Parse(MaMAX);
            int    MaNVTiepTheo = SoMAX + 1;

            return("TK" + MaNVTiepTheo.ToString("000"));
        }