Пример #1
0
        public static int getInscriptionsNumber(string Cin)
        {
            string       request = "SELECT count(*) from Inscription where CIN=@CIN";
            SqlCeCommand cmd     = new SqlCeCommand(request, Program.cnn);

            cmd.Parameters.Add("@CIN", SqlDbType.NVarChar).Value = Cin;
            return((int)DataBaseAccessUtilities.ScalarRequest(cmd));
        }
Пример #2
0
        public static bool checkKeyUnicity(string Cin)
        {
            string       request = "SELECT count(*) from FicheInformation where CIN=@CIN";
            SqlCeCommand cmd     = new SqlCeCommand(request, Program.cnn);

            cmd.Parameters.Add("@CIN", SqlDbType.NVarChar).Value = Cin;
            int x = (int)DataBaseAccessUtilities.ScalarRequest(cmd);

            if (x == 0)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }