Пример #1
0
        public static int isClinteBypersonAdmin(int idPerson)
        {
            int isClient = (int)Admin_TableAdapter.ScalarIsClienteByPerson(idPerson);

            if (isClient != 0)
            {
                return((int)Admin_TableAdapter.ScalarReturnIdClienteByIdPersona(idPerson));
            }
            else
            {
                Admin_TableAdapter.InsertCliente(idPerson);
                return((int)Admin_TableAdapter.ScalarReturnIdClienteByIdPersona(idPerson));
            }
        }