public int GenerateCode()
        {
            int    count = 0;
            Random rand  = new Random();
            int    code  = rand.Next(1000, 9999);

            while (_sr.CheckifCodeExist(code) && count < 4000)
            {
                count++;
                code = rand.Next(1000, 9999);
            }
            return(code);
        }